use of org.neo4j.bolt.testing.client.SocketConnection in project neo4j by neo4j.
the class InProcessServerBuilderIT method shouldOpenBoltPort.
@Test
void shouldOpenBoltPort() {
// given
try (Neo4j neo4j = getTestBuilder(directory.homePath()).build()) {
URI uri = neo4j.boltURI();
// when
assertDoesNotThrow(() -> new SocketConnection().connect(new HostnamePort(uri.getHost(), uri.getPort())));
}
}
use of org.neo4j.bolt.testing.client.SocketConnection in project neo4j by neo4j.
the class MultipleBoltServerPortsStressTest method splitTrafficBetweenPorts.
@Test
void splitTrafficBetweenPorts() throws Exception {
SocketConnection externalConnection = new SocketConnection();
SocketConnection internalConnection = new SocketConnection();
try {
HostnamePort externalAddress = server.lookupConnector(BoltConnector.NAME);
HostnamePort internalAddress = server.lookupConnector(BoltConnector.INTERNAL_NAME);
executeStressTest(Executors.newFixedThreadPool(NUMBER_OF_THREADS), externalAddress, internalAddress);
} finally {
externalConnection.disconnect();
internalConnection.disconnect();
}
}
use of org.neo4j.bolt.testing.client.SocketConnection 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();
}
use of org.neo4j.bolt.testing.client.SocketConnection in project neo4j by neo4j.
the class BoltChannelAutoReadLimiterIT method setup.
@BeforeEach
public void setup(TestInfo testInfo) throws Exception {
server.setGraphDatabaseFactory(getTestGraphDatabaseFactory());
server.setConfigure(getSettingsFunction());
server.init(testInfo);
address = server.lookupDefaultConnector();
connection = new SocketConnection();
util = new TransportTestUtil();
installSleepProcedure(server.graphDatabaseService());
}
use of org.neo4j.bolt.testing.client.SocketConnection in project neo4j by neo4j.
the class ConnectionTrackingIT method connectSocketTo.
private TransportConnection connectSocketTo(URI uri) throws IOException {
SocketConnection connection = new SocketConnection();
connections.add(connection);
connection.connect(new HostnamePort(uri.getHost(), uri.getPort()));
return connection;
}
Aggregations