You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "xyuanlu (via GitHub)" <gi...@apache.org> on 2023/06/01 20:50:20 UTC

[GitHub] [helix] xyuanlu commented on a diff in pull request #2516: change undetermined check in unit test

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: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org