use of com.baidu.hugegraph.computer.core.network.TransportClient in project hugegraph-computer by hugegraph.
the class AbstractNetworkTest method oneClient.
protected TransportClient oneClient() throws IOException {
ConnectionId connectionId = ConnectionId.parseConnectionId(host, port);
TransportClient client = connectionManager.getOrCreateClient(connectionId);
Assert.assertTrue(client.active());
return client;
}
use of com.baidu.hugegraph.computer.core.network.TransportClient in project hugegraph-computer by hugegraph.
the class ConnectionManagerTest method testCloseClient.
@Test
public void testCloseClient() throws IOException {
ConnectionId connectionId = ConnectionId.parseConnectionId("127.0.0.1", port);
TransportClient client = connectionManager.getOrCreateClient(connectionId);
Assert.assertTrue(client.active());
connectionManager.closeClient(client.connectionId());
Assert.assertFalse(client.active());
}
Aggregations