use of org.neo4j.bolt.BoltProtocolVersion in project neo4j by neo4j.
the class BoltStateMachineFactoryImplTest method shouldCreateBoltStateMachinesV3.
@Test
void shouldCreateBoltStateMachinesV3() {
BoltStateMachineFactoryImpl factory = newBoltFactory();
var memoryTracker = mock(MemoryTracker.class, RETURNS_MOCKS);
BoltStateMachine boltStateMachine = factory.newStateMachine(new BoltProtocolVersion(3, 0), CHANNEL, MapValue.EMPTY, memoryTracker);
assertNotNull(boltStateMachine);
assertThat(boltStateMachine).isInstanceOf(BoltStateMachineV3.class);
verify(memoryTracker).getScopedMemoryTracker();
verify(memoryTracker, times(3)).allocateHeap(anyLong());
verifyNoMoreInteractions(memoryTracker);
}
use of org.neo4j.bolt.BoltProtocolVersion in project neo4j by neo4j.
the class BoltProtocolV4Test method shouldVersionReturnBoltV4.
@Test
void shouldVersionReturnBoltV4() throws Throwable {
BoltProtocolV4 protocolV4 = createProtocolV4();
assertThat(protocolV4.version()).isEqualTo(new BoltProtocolVersion(4, 0));
}
Aggregations