hangc0276 commented on code in PR #3423:
URL: https://github.com/apache/bookkeeper/pull/3423#discussion_r929416509


##########
bookkeeper-server/src/test/java/org/apache/bookkeeper/test/ReadOnlyBookieTest.java:
##########
@@ -128,8 +129,10 @@ public void testBookieShouldTurnWritableFromReadOnly() 
throws Exception {
             // Expected
         }
 
-        bkc.waitForReadOnlyBookie(BookieImpl.getBookieId(confByIndex(1)))
-            .get(30, TimeUnit.SECONDS);
+        // waitForReadOnlyBookie adds another listener thread to observe the 
node status of bookie,
+        // which may be out of sync with the triggering of node changes in 
EnsemblePlacementPolicy.
+        // This sequence leads to flaky test. So change from watching zk to 
thread sleep.
+        Thread.sleep(3000);

Review Comment:
   Would you please use `Awayatility` instead of sleep ? 



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

Reply via email to