优化文档刷新逻辑

This commit is contained in:
tanghc
2019-08-13 14:46:54 +08:00
parent 66e378816c
commit aabc7b90a7
13 changed files with 244 additions and 51 deletions

View File

@@ -31,4 +31,22 @@ public class CuratorTest extends TestCase {
} catch (Exception e) {
}
}
/**
* 删除临时节点
*/
public void testDelTemp() {
String tempRoot = "/com.gitee.sop.service.tmp";
CuratorFramework client = CuratorFrameworkFactory.builder()
.connectString(zookeeperServerAddr)
.retryPolicy(new ExponentialBackoffRetry(1000, 3))
.build();
client.start();
try {
client.delete().deletingChildrenIfNeeded().forPath(tempRoot);
} catch (Exception e) {
}
}
}