use of org.neo4j.bolt.v3.messaging.request.CommitMessage.COMMIT_MESSAGE in project neo4j by neo4j.
the class TransactionReadyStateIT method shouldMoveToReadyOnCommit_succ.
@Test
void shouldMoveToReadyOnCommit_succ() throws Throwable {
BoltStateMachineV3 machine = getBoltStateMachineInTxReadyState();
// When
BoltResponseRecorder recorder = new BoltResponseRecorder();
machine.process(COMMIT_MESSAGE, recorder);
// Then
RecordedBoltResponse response = recorder.nextResponse();
assertThat(response).satisfies(succeeded());
assertTrue(response.hasMetadata("bookmark"));
assertThat(machine.state()).isInstanceOf(ReadyState.class);
}
use of org.neo4j.bolt.v3.messaging.request.CommitMessage.COMMIT_MESSAGE in project neo4j by neo4j.
the class BoltRequestMessageV3Test method shouldHandleCommonMessages.
@Test
void shouldHandleCommonMessages() throws Throwable {
assertSerializes(new HelloMessage(map("user_agent", "MyClient/1.0", "scheme", "basic")));
assertSerializes(new RunMessage("CREATE (n) RETURN åäö"));
assertSerializes(DiscardAllMessage.INSTANCE);
assertSerializes(PullAllMessage.INSTANCE);
assertSerializes(new BeginMessage());
assertSerializes(COMMIT_MESSAGE);
assertSerializes(ROLLBACK_MESSAGE);
assertSerializes(ResetMessage.INSTANCE);
assertSerializes(GOODBYE_MESSAGE);
}
Aggregations