Search in sources :

Example 1 with ORemoteConnectionManager

use of com.orientechnologies.orient.client.remote.ORemoteConnectionManager in project orientdb by orientechnologies.

the class ServerTest method testConnectClose.

@Test
public void testConnectClose() throws IOException {
    ORemoteConnectionManager connManager = (((OEngineRemote) Orient.instance().getRunningEngine("remote"))).getConnectionManager();
    int count = connManager.getAvailableConnections(serverURL);
    OServerAdmin server = new OServerAdmin(serverURL);
    server.connect("root", ODatabaseHelper.getServerRootPassword());
    server.close();
    Assert.assertEquals(connManager.getAvailableConnections(serverURL), count);
}
Also used : ORemoteConnectionManager(com.orientechnologies.orient.client.remote.ORemoteConnectionManager) OServerAdmin(com.orientechnologies.orient.client.remote.OServerAdmin) Test(org.testng.annotations.Test)

Aggregations

ORemoteConnectionManager (com.orientechnologies.orient.client.remote.ORemoteConnectionManager)1 OServerAdmin (com.orientechnologies.orient.client.remote.OServerAdmin)1 Test (org.testng.annotations.Test)1