You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/07/26 05:25:07 UTC

[GitHub] [bookkeeper] wenbingshen commented on a diff in pull request #3423: fix Flaky-test: testBookieShouldTurnWritableFromReadOnly

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


##########
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:
   sure. I have addressed your comments. PTAL.



-- 
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: issues-unsubscribe@bookkeeper.apache.org

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