Search in sources :

Example 26 with OServer

use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.

the class OrientGraphRemoteTest method startEmbeddedServer.

@BeforeClass
public static void startEmbeddedServer() throws Exception {
    final String buildDirectory = System.getProperty("buildDirectory", ".");
    serverHome = buildDirectory + "/" + OrientGraphRemoteTest.class.getSimpleName();
    File file = new File(serverHome);
    deleteDirectory(file);
    file = new File(serverHome);
    Assert.assertTrue(file.mkdir());
    oldOrientDBHome = System.getProperty("ORIENTDB_HOME");
    System.setProperty("ORIENTDB_HOME", serverHome);
    server = new OServer(false);
    server.startup(OrientGraphRemoteTest.class.getResourceAsStream("/embedded-server-config.xml"));
    server.activate();
}
Also used : OServer(com.orientechnologies.orient.server.OServer)

Example 27 with OServer

use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.

the class RemoteRidBagTest 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();
    final OServerAdmin serverAdmin = new OServerAdmin("remote:localhost");
    serverAdmin.connect("root", "D2AFD02F20640EC8B7A5140F34FCA49D2289DB1F0D0598BB9DE8AAA75A0792F3");
    serverAdmin.createDatabase("RemoteRidBagTest", "document", "memory");
    clientA = Executors.newSingleThreadExecutor();
    clientB = Executors.newSingleThreadExecutor();
    clientA.submit(new Runnable() {

        @Override
        public void run() {
            dbA = new ODatabaseDocumentTx("remote:localhost/RemoteRidBagTest").open("admin", "admin");
        }
    }).get();
    clientB.submit(new Runnable() {

        @Override
        public void run() {
            dbB = new ODatabaseDocumentTx("remote:localhost/RemoteRidBagTest").open("admin", "admin");
        }
    }).get();
}
Also used : OServer(com.orientechnologies.orient.server.OServer) ODatabaseDocumentTx(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx) OServerAdmin(com.orientechnologies.orient.client.remote.OServerAdmin) Before(org.junit.Before)

Example 28 with OServer

use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.

the class BaseHttpTest method startServer.

protected void startServer() throws Exception {
    if (server == null) {
        server = new OServer(false);
        server.startup(getClass().getResourceAsStream(getServerCfg()));
        server.activate();
    }
}
Also used : OServer(com.orientechnologies.orient.server.OServer)

Example 29 with OServer

use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.

the class ORemoteImportTest 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(ORemoteImportTest.class.getSimpleName(), "graph", "memory");
}
Also used : OServer(com.orientechnologies.orient.server.OServer) OServerAdmin(com.orientechnologies.orient.client.remote.OServerAdmin) Before(org.junit.Before)

Example 30 with OServer

use of com.orientechnologies.orient.server.OServer in project orientdb by orientechnologies.

the class RemoteSequenceTest 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(RemoteSequenceTest.class.getSimpleName(), "graph", "memory");
}
Also used : OServer(com.orientechnologies.orient.server.OServer) OServerAdmin(com.orientechnologies.orient.client.remote.OServerAdmin) Before(org.junit.Before)

Aggregations

OServer (com.orientechnologies.orient.server.OServer)34 OServerAdmin (com.orientechnologies.orient.client.remote.OServerAdmin)10 Before (org.junit.Before)10 File (java.io.File)5 OHazelcastPlugin (com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin)4 ODatabaseDocumentInternal (com.orientechnologies.orient.core.db.ODatabaseDocumentInternal)3 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)3 OCommandExecutionException (com.orientechnologies.orient.core.exception.OCommandExecutionException)3 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)3 BeforeClass (org.junit.BeforeClass)2 Test (org.junit.Test)2 OException (com.orientechnologies.common.exception.OException)1 OPartitionedDatabasePoolFactory (com.orientechnologies.orient.core.db.OPartitionedDatabasePoolFactory)1 ODatabaseDocument (com.orientechnologies.orient.core.db.document.ODatabaseDocument)1 OCommandSQL (com.orientechnologies.orient.core.sql.OCommandSQL)1 OCommandSQLParsingException (com.orientechnologies.orient.core.sql.OCommandSQLParsingException)1 OSQLSynchQuery (com.orientechnologies.orient.core.sql.query.OSQLSynchQuery)1 OObjectDatabaseTx (com.orientechnologies.orient.object.db.OObjectDatabaseTx)1 ODistributedConfiguration (com.orientechnologies.orient.server.distributed.ODistributedConfiguration)1 OServerNetworkListener (com.orientechnologies.orient.server.network.OServerNetworkListener)1