use of org.neo4j.kernel.configuration.BoltConnector in project neo4j by neo4j.
the class GraphDatabaseSettingsTest method shouldBeAbleToOverrideBoltListenAddressesWithJustOneParameter.
@Test
public void shouldBeAbleToOverrideBoltListenAddressesWithJustOneParameter() throws Exception {
// given
Config config = Config.embeddedDefaults(stringMap("dbms.connector.bolt.enabled", "true", "dbms.connector.bolt.listen_address", ":8000"));
BoltConnector boltConnector = config.boltConnectors().get(0);
// then
assertEquals(new ListenSocketAddress("localhost", 8000), config.get(boltConnector.listen_address));
}
use of org.neo4j.kernel.configuration.BoltConnector in project neo4j by neo4j.
the class GraphDatabaseSettingsTest method shouldDeriveBoltListenAddressFromDefaultListenAddress.
@Test
public void shouldDeriveBoltListenAddressFromDefaultListenAddress() throws Exception {
// given
Config config = Config.embeddedDefaults(stringMap("dbms.connector.bolt.enabled", "true", "dbms.connectors.default_listen_address", "0.0.0.0"));
BoltConnector boltConnector = config.boltConnectors().get(0);
// then
assertEquals(new ListenSocketAddress("0.0.0.0", 7687), config.get(boltConnector.listen_address));
}
use of org.neo4j.kernel.configuration.BoltConnector in project neo4j by neo4j.
the class GraphDatabaseSettingsTest method shouldDeriveBoltListenAddressFromDefaultListenAddressAndSpecifiedPort.
@Test
public void shouldDeriveBoltListenAddressFromDefaultListenAddressAndSpecifiedPort() throws Exception {
// given
Config config = Config.embeddedDefaults(stringMap("dbms.connectors.default_listen_address", "0.0.0.0", "dbms.connector.bolt.enabled", "true", "dbms.connector.bolt.listen_address", ":8000"));
BoltConnector boltConnector = config.boltConnectors().get(0);
// then
assertEquals(new ListenSocketAddress("0.0.0.0", 8000), config.get(boltConnector.listen_address));
}
use of org.neo4j.kernel.configuration.BoltConnector in project neo4j by neo4j.
the class AbstractInProcessServerBuilder method init.
private void init(File workingDir) {
setDirectory(workingDir);
withConfig(auth_enabled, "false");
withConfig(pagecache_memory, "8m");
BoltConnector bolt0 = new BoltConnector("bolt");
HttpConnector http1 = new HttpConnector("http", Encryption.NONE);
HttpConnector http2 = new HttpConnector("https", Encryption.TLS);
withConfig(http1.type, "HTTP");
withConfig(http1.encryption, Encryption.NONE.name());
withConfig(http1.enabled, "true");
withConfig(http1.address, "localhost:" + Integer.toString(freePort(1001, 3000)));
withConfig(http2.type, "HTTP");
withConfig(http2.encryption, Encryption.TLS.name());
withConfig(http2.enabled, "false");
withConfig(http2.address, "localhost:" + Integer.toString(freePort(3001, 5000)));
withConfig(bolt0.type, "BOLT");
withConfig(bolt0.enabled, "true");
withConfig(bolt0.address, "localhost:" + Integer.toString(freePort(5001, 9000)));
}
use of org.neo4j.kernel.configuration.BoltConnector in project neo4j by neo4j.
the class BoltIT method shouldLaunchBolt.
@Test
public void shouldLaunchBolt() throws Throwable {
// When I run Neo4j with Bolt enabled
server = server().withProperty(new BoltConnector("bolt").type.name(), "BOLT").withProperty(new BoltConnector("bolt").enabled.name(), "true").withProperty(new BoltConnector("bolt").encryption_level.name(), "REQUIRED").usingDataDir(tmpDir.getRoot().getAbsolutePath()).build();
server.start();
// Then
assertEventuallyServerResponds("localhost", 7687);
}
Aggregations