文档分组显示,代码优化

This commit is contained in:
tanghc
2019-04-19 14:39:45 +08:00
parent e1e7b2c738
commit 5bd787b7e3
25 changed files with 702 additions and 344 deletions

View File

@@ -11,7 +11,7 @@ import org.apache.curator.retry.ExponentialBackoffRetry;
*/
public class CuratorTest extends TestCase {
private String zookeeperServerAddr = "127.0.0.1:2181";
private String zookeeperServerAddr = "localhost:2181";
/**
* 递归删除节点,只能在测试环境用。
@@ -30,17 +30,5 @@ public class CuratorTest extends TestCase {
client.delete().deletingChildrenIfNeeded().forPath(SopConstants.SOP_SERVICE_ROUTE_PATH);
} catch (Exception e) {
}
try {
client.delete().deletingChildrenIfNeeded().forPath(SopConstants.SOP_SERVICE_ROUTE_PATH + "-default");
} catch (Exception e) {
}
try {
client.delete().deletingChildrenIfNeeded().forPath(SopConstants.SOP_SERVICE_ROUTE_PATH + "-dev");
} catch (Exception e) {
}
try {
client.delete().deletingChildrenIfNeeded().forPath(SopConstants.SOP_SERVICE_ROUTE_PATH + "-test");
} catch (Exception e) {
}
}
}