Search in sources :

Example 1 with TransportTestUtil

use of org.neo4j.bolt.testing.TransportTestUtil in project neo4j by neo4j.

the class BoltV43TransportIT method setUp.

@BeforeEach
public void setUp(TestInfo testInfo) throws IOException {
    server.setConfigure(withOptionalBoltEncryption());
    server.init(testInfo);
    address = server.lookupDefaultConnector();
    util = new TransportTestUtil(newMessageEncoder());
}
Also used : TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with TransportTestUtil

use of org.neo4j.bolt.testing.TransportTestUtil in project neo4j by neo4j.

the class BoltV41TransportIT method setUp.

@BeforeEach
public void setUp(TestInfo testInfo) throws IOException {
    server.setConfigure(settings -> {
        withOptionalBoltEncryption().accept(settings);
        settings.put(FabricSettings.enabled_by_default, false);
    });
    server.init(testInfo);
    address = server.lookupDefaultConnector();
    util = new TransportTestUtil(newMessageEncoder());
}
Also used : TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with TransportTestUtil

use of org.neo4j.bolt.testing.TransportTestUtil in project neo4j by neo4j.

the class BoltV42TransportIT method setUp.

@BeforeEach
public void setUp(TestInfo testInfo) throws IOException {
    server.setConfigure(settings -> {
        withOptionalBoltEncryption().accept(settings);
        settings.put(FabricSettings.enabled_by_default, false);
    });
    server.init(testInfo);
    address = server.lookupDefaultConnector();
    util = new TransportTestUtil(newMessageEncoder());
}
Also used : TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with TransportTestUtil

use of org.neo4j.bolt.testing.TransportTestUtil in project neo4j by neo4j.

the class MultipleBoltServerPortsStressTest method setUp.

@BeforeEach
void setUp(TestInfo testInfo) throws IOException {
    server.setGraphDatabaseFactory(new SharedAuthManagerDbmsBuilder());
    server.setConfigure(settings -> {
        settings.put(BoltConnector.enabled, true);
        settings.put(BoltConnector.listen_address, new SocketAddress(0));
        settings.put(GraphDatabaseSettings.routing_enabled, true);
        settings.put(GraphDatabaseSettings.routing_listen_address, new SocketAddress(0));
    });
    server.init(testInfo);
    util = new TransportTestUtil(newMessageEncoder());
}
Also used : TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) SocketAddress(org.neo4j.configuration.helpers.SocketAddress) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with TransportTestUtil

use of org.neo4j.bolt.testing.TransportTestUtil in project neo4j by neo4j.

the class BoltKeepAliveSchedulingIT method setup.

@BeforeEach
public void setup(TestInfo testInfo) throws Exception {
    server.setConfigure(getSettingsFunction());
    server.init(testInfo);
    installSleepProcedure(server.graphDatabaseService());
    address = server.lookupDefaultConnector();
    connection = new SocketConnection();
    util = new TransportTestUtil();
}
Also used : SocketConnection(org.neo4j.bolt.testing.client.SocketConnection) TransportTestUtil(org.neo4j.bolt.testing.TransportTestUtil) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

TransportTestUtil (org.neo4j.bolt.testing.TransportTestUtil)16 BeforeEach (org.junit.jupiter.api.BeforeEach)12 BeforeAll (org.junit.jupiter.api.BeforeAll)3 Neo4jPackV2 (org.neo4j.bolt.packstream.Neo4jPackV2)2 SocketConnection (org.neo4j.bolt.testing.client.SocketConnection)2 SelfSignedCertificateFactory (org.neo4j.test.ssl.SelfSignedCertificateFactory)2 Path (java.nio.file.Path)1 BouncyCastleProvider (org.bouncycastle.jce.provider.BouncyCastleProvider)1 SocketAddress (org.neo4j.configuration.helpers.SocketAddress)1