mgao0 commented on a change in pull request #693: Removed useless znodes to 
resolve dependency between test methods in TestZKUtil
URL: https://github.com/apache/helix/pull/693#discussion_r370784950
 
 

 ##########
 File path: helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java
 ##########
 @@ -63,6 +65,13 @@ public void afterClass() {
     deleteCluster(clusterName);
   }
 
+  @AfterMethod()
+  public void afterMethod() {
+    String path = PropertyPathBuilder.instanceConfig(clusterName);
+    _gZkClient.deleteRecursively(path);
+    _gZkClient.createPersistent(path);
 
 Review comment:
   I agree it can cause unnecessary delete operation calls such as in 
`testIsClusterSetup`, but it doesn't add too much latency since what it does is 
deleting the nodes, not recreating the cluster . It is also safer than leaving 
the clean up responsibility to each method, as it can make sure the cluster is 
clean for each test method. I think both way work and it's barely a trade off.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to