jiajunwang commented on a change in pull request #1104:
URL: https://github.com/apache/helix/pull/1104#discussion_r442525807



##########
File path: 
helix-core/src/test/java/org/apache/helix/integration/TestZkCallbackHandlerLeak.java
##########
@@ -605,9 +605,12 @@ public void onStateChange(String instanceName, 
List<CurrentState> statesInfo,
         "Should have 1 data-watches: MESSAGES");
     Assert.assertEquals(watchPaths.get("childWatches").size(), 1,
         "Should have 1 child-watches: MESSAGES");
-    Assert
-        .assertEquals(watchPaths.get("existWatches").size(), 2,
-            "Should have 2 exist-watches: CURRENTSTATE/{oldSessionId} and 
CURRENTSTATE/{oldSessionId}/TestDB0");
+    result = TestHelper.verify(()-> {
+      Map<String, List<String>> wPaths = 
ZkTestHelper.getZkWatch(participantToExpire.getZkClient());
+      return wPaths.get("existWatches").size() == 1;
+    }, 10000);
+    Assert.assertTrue(result,
+        "Should have 1 exist-watches: CURRENTSTATE/{oldSessionId}");

Review comment:
       Please correct me if I am wrong.
   When the participant handles the new session, this folder of the old session 
will be removed, right? With the new change, should the watcher be removed as 
well when the folder being deleted?




----------------------------------------------------------------
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]



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

Reply via email to