use of com.orientechnologies.orient.server.config.OServerNetworkListenerConfiguration in project orientdb by orientechnologies.
the class OServerShutdownMainTest method startupOServer.
@Before
public void startupOServer() throws Exception {
OLogManager.instance().setConsoleLevel(Level.OFF.getName());
prevPassword = System.setProperty("ORIENTDB_ROOT_PASSWORD", "rootPassword");
prevOrientHome = System.setProperty("ORIENTDB_HOME", "./target/testhome");
allowJvmShutdownPrev = OGlobalConfiguration.ENVIRONMENT_ALLOW_JVM_SHUTDOWN.getValueAsBoolean();
OGlobalConfiguration.ENVIRONMENT_ALLOW_JVM_SHUTDOWN.setValue(false);
OServerConfiguration conf = new OServerConfiguration();
conf.network = new OServerNetworkConfiguration();
conf.network.protocols = new ArrayList<OServerNetworkProtocolConfiguration>();
conf.network.protocols.add(new OServerNetworkProtocolConfiguration("binary", ONetworkProtocolBinary.class.getName()));
conf.network.protocols.add(new OServerNetworkProtocolConfiguration("http", ONetworkProtocolHttpDb.class.getName()));
conf.network.listeners = new ArrayList<OServerNetworkListenerConfiguration>();
conf.network.listeners.add(new OServerNetworkListenerConfiguration());
server = new OServer(false);
server.startup(conf);
server.activate();
assertThat(server.isActive()).isTrue();
}
Aggregations