test case
public class TestMetaClient extends TestCase {
private static final Logger LOGGER = LoggerFactory.getLogger(TestMetaClient.class);
private final String address = "10.27.20.112";
private final int port = 9559;
private MetaClient metaClient;
public void testListHosts() {
if (metaClient == null) {
metaClient = new MetaClient(address, port);
}
metaClient.listHosts();
}
}
运行testListHosts()方法报错:
com.vesoft.nebula.client.graph.exception.IOErrorException: All servers are broken.
at com.vesoft.nebula.client.graph.net.ConnObjectPool.create(ConnObjectPool.java:24)
at com.vesoft.nebula.client.graph.net.ConnObjectPool.create(ConnObjectPool.java:10)
at org.apache.commons.pool2.BasePooledObjectFactory.makeObject(BasePooledObjectFactory.java:60)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:836)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:434)
at com.vesoft.nebula.client.graph.net.NebulaPool.getSession(NebulaPool.java:96)
at com.vesoft.nebula.client.meta.MockNebulaGraph.initGraph(MockNebulaGraph.java:37)
at com.vesoft.nebula.client.meta.TestMetaClient.setUp(TestMetaClient.java:29)
at junit.framework.TestCase.runBare(TestCase.java:140)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:130)
at junit.framework.TestSuite.runTest(TestSuite.java:241)
at junit.framework.TestSuite.run(TestSuite.java:236)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)