kpm1985 commented on a change in pull request #1043: FLUO-1002 Create
integration test for `FluoAdmin.remove()`
URL: https://github.com/apache/fluo/pull/1043#discussion_r196614425
##########
File path:
modules/core/src/main/java/org/apache/fluo/core/util/CuratorUtil.java
##########
@@ -116,6 +116,15 @@ public static CuratorFramework newCurator(String
zookeepers, int timeout, String
}
}
+ public static boolean pathExist(CuratorFramework curator, String zPath) {
+ try {
+ return curator.checkExists().forPath(zPath) != null
+ && !curator.getChildren().forPath(zPath).isEmpty();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
Review comment:
Absolutely, maybe I should refactor FluoAdminImpl.java that I stole that
from also?
https://github.com/apache/fluo/blob/01fc804f5914e6f9f2f4bfed8fc6e3e2701c16dd/modules/core/src/main/java/org/apache/fluo/core/client/FluoAdminImpl.java#L498-L505
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services