private static EnterpriseNeoServer createServer(boolean persistent) throws IOException { EnterpriseServerBuilder builder = EnterpriseServerBuilder.server(); configureHostname(builder); if (persistent) builder = (EnterpriseServerBuilder) builder.persistent(); EnterpriseNeoServer server = builder.build(); server.start(); return server; }
private static void configureHostname(EnterpriseServerBuilder builder) { String hostName = System.getProperty("neo-server.test.hostname"); if (StringUtils.isNotEmpty(hostName)) { builder.onHost(hostName); } }