Authored by FengRuwei

update

... ... @@ -184,6 +184,13 @@ public class ServTest {
client= CuratorFrameworkFactory.newClient(CONNECT_STR,retryPolicy);
if(client==null) return;
client.start();
Runtime.getRuntime().addShutdownHook(new Thread(){
public void run() {
CloseableUtils.closeQuietly(client);
}
});
XServCenter xServCenter=new XServCenter();
xServCenter.init(client);
for(int i=0;i<10;i++) {
... ... @@ -201,14 +208,9 @@ public class ServTest {
xServCenter.getServiceByName("serv_name_1");
Thread.sleep(500);
}
Thread.sleep(600000);
Runtime.getRuntime().addShutdownHook(new Thread(){
public void run() {
CloseableUtils.closeQuietly(client);
}
});
}
}
```
... ...