xyuanlu commented on code in PR #2516:
URL: https://github.com/apache/helix/pull/2516#discussion_r1213666828


##########
zookeeper-api/src/test/java/org/apache/helix/zookeeper/impl/TestZooKeeperConnection.java:
##########
@@ -53,10 +53,11 @@ void testPersistWatcher() throws Exception {
       _zk.writeData(path, ("datat"+i).getBytes(), -1);
       _zk.create(path+"/c2_" +i, null, ZooDefs.Ids.OPEN_ACL_UNSAFE, 
CreateMode.PERSISTENT);
     }
+    System.out.println("testPersistWatcher: rafter register one time listener, 
original listener received event count: " + get_count[0]);
+    // total number of event is 400. We will miss event now
     Assert.assertTrue(TestHelper.verify(() -> {
-          return (get_count[0].get() == 202);
-        }, TestHelper.WAIT_DURATION));
-    System.out.println("testPersistWatcher received event count: " + 
get_count[0]);
+      return (get_count[0].get() < 400);

Review Comment:
   Good point. It should have lower bound of 202. 



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

To unsubscribe, e-mail: [email protected]

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