use of org.neo4j.shell.impl.RemoteClient in project neo4j-documentation by neo4j.
the class ShellDocTest method testEnableServerOnDefaultPort.
@Test
public void testEnableServerOnDefaultPort() throws Exception {
GraphDatabaseService graphDb = new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().setConfig(ShellSettings.remote_shell_enabled, Settings.TRUE).newGraphDatabase();
try {
RemoteClient client = new RemoteClient(NO_INITIAL_SESSION, remoteLocation(), new CollectingOutput());
client.evaluate("help");
client.shutdown();
} finally {
graphDb.shutdown();
}
}
use of org.neo4j.shell.impl.RemoteClient in project neo4j-documentation by neo4j.
the class ShellDocTest method testEnableRemoteShellOnCustomPort.
@Test
public void testEnableRemoteShellOnCustomPort() throws Exception {
int port = 8085;
GraphDatabaseService graphDb = new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().setConfig(ShellSettings.remote_shell_enabled, "true").setConfig(ShellSettings.remote_shell_port, "" + port).newGraphDatabase();
RemoteClient client = new RemoteClient(NO_INITIAL_SESSION, remoteLocation(port), new CollectingOutput());
client.evaluate("help");
client.shutdown();
graphDb.shutdown();
}
Aggregations