use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.
the class OServerTest method testRestart.
/**
* Test for https://github.com/orientechnologies/orientdb/issues/1667
*/
@Test
public void testRestart() throws Exception {
// set ORIENTDB_HOME
final String buildDirectory = System.getProperty("buildDirectory", ".");
System.setProperty("ORIENTDB_HOME", buildDirectory + File.separator + OServerTest.class.getSimpleName());
OLogManager.instance().info(this, "ORIENTDB_HOME: " + System.getProperty("ORIENTDB_HOME"));
// loop for start & stop server
for (int i = 0; i < 5; i++) {
OLogManager.instance().info(this, "Iteration " + i);
OServer server = new OServer(false).activate();
// create database if does not exist
OObjectDatabaseTx database = new OObjectDatabaseTx("plocal:" + System.getProperty("ORIENTDB_HOME") + "/test-db");
if (!database.exists())
database.create();
database.open("admin", "admin");
database.countClass("ouser");
database.close();
server.shutdown();
}
}
use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.
the class OLiveQueryShutdownTest method bootServer.
public void bootServer() throws Exception {
server = new OServer();
server.setServerRootDirectory(SERVER_DIRECTORY);
server.startup(getClass().getResourceAsStream("orientdb-server-config.xml"));
server.activate();
OServerAdmin server = new OServerAdmin("remote:localhost");
server.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
server.createDatabase(OLiveQueryShutdownTest.class.getSimpleName(), "graph", "memory");
}
use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.
the class RemoteIndexSupportTest method before.
@Before
public void before() throws Exception {
server = new OServer();
server.setServerRootDirectory(SERVER_DIRECTORY);
server.startup(getClass().getResourceAsStream("orientdb-server-config.xml"));
server.activate();
OServerAdmin server = new OServerAdmin("remote:localhost");
server.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
server.createDatabase("test", "graph", "memory");
}
use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.
the class RunServerTest method before.
@BeforeSuite
public void before() throws Exception {
server = new OServer();
server.startup(RunServerTest.class.getClassLoader().getResourceAsStream("orientdb-server-config.xml"));
server.activate();
}
Aggregations