Search in sources :

Example 6 with BoltConnectionDescriptor

use of org.neo4j.bolt.v1.runtime.BoltConnectionDescriptor in project neo4j by neo4j.

the class SessionRule method newMachine.

BoltStateMachine newMachine(BoltConnectionDescriptor connectionDescriptor, Clock clock) {
    if (boltFactory == null) {
        throw new IllegalStateException("Cannot access test environment before test is running.");
    }
    BoltStateMachine connection = boltFactory.newMachine(connectionDescriptor, () -> {
    }, clock);
    runningMachines.add(connection);
    return connection;
}
Also used : BoltStateMachine(org.neo4j.bolt.v1.runtime.BoltStateMachine)

Aggregations

BoltStateMachine (org.neo4j.bolt.v1.runtime.BoltStateMachine)5 BoltConnectionDescriptor (org.neo4j.bolt.v1.runtime.BoltConnectionDescriptor)4 InetSocketAddress (java.net.InetSocketAddress)3 Test (org.junit.Test)3 BoltResponseRecorder (org.neo4j.bolt.testing.BoltResponseRecorder)2 BoltConnectionFatality (org.neo4j.bolt.v1.runtime.BoltConnectionFatality)2 Transaction (org.neo4j.graphdb.Transaction)2 HashMap (java.util.HashMap)1 BiFunction (java.util.function.BiFunction)1 Server (org.eclipse.jetty.server.Server)1 BoltWorker (org.neo4j.bolt.v1.runtime.BoltWorker)1 BoltProtocolV1 (org.neo4j.bolt.v1.transport.BoltProtocolV1)1 BinaryLatch (org.neo4j.concurrent.BinaryLatch)1 Node (org.neo4j.graphdb.Node)1 Barrier (org.neo4j.test.Barrier)1 DoubleLatch (org.neo4j.test.DoubleLatch)1