use of io.etcd.jetcd.common.exception.ClosedClientException in project dubbo by alibaba.
the class JEtcdClientTest method test_watch_after_client_closed.
@Test
public void test_watch_after_client_closed() throws InterruptedException {
String path = "/dubbo/com.alibaba.dubbo.demo.DemoService/providers";
client.close();
try {
client.addChildListener(path, (parent, children) -> {
Assertions.assertEquals(path, parent);
});
} catch (ClosedClientException e) {
Assertions.assertEquals("watch client has been closed, path '" + path + "'", e.getMessage());
}
}
Aggregations