From 7eae12f755c395cc60930245a8a9700c3e9344bd Mon Sep 17 00:00:00 2001 From: Hang Chen Date: Thu, 7 Dec 2023 08:58:05 +0800 Subject: [PATCH] Use Flaky flag to skip testBookieServerZKSessionExpireBehaviour test (#4144) ### Motivation The `BookieZKExpireTest.testBookieServerZKSessionExpireBehaviour` is a flaky test and the root cause is described in https://github.com/apache/bookkeeper/pull/3418. There is a race condition in the zookeeper reconnection and listener and it is an expected behavior in Bookie. We created one issue to track this https://github.com/apache/bookkeeper/issues/4142. We can skip this flaky test to unblock the pending PRs. --- .../java/org/apache/bookkeeper/test/BookieZKExpireTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java index 8713756edaf..808b7e8f900 100644 --- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java +++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/test/BookieZKExpireTest.java @@ -32,6 +32,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.bookkeeper.bookie.MockUncleanShutdownDetection; import org.apache.bookkeeper.bookie.TestBookieImpl; +import org.apache.bookkeeper.common.testing.annotations.FlakyTest; import org.apache.bookkeeper.conf.ServerConfiguration; import org.apache.bookkeeper.proto.BookieServer; import org.apache.bookkeeper.stats.NullStatsLogger; @@ -121,7 +122,7 @@ conf, new TestBookieImpl(conf), Attempt to reconnect by BookieStateManager's RegistrationManager listener will fail (even if retry it many times). */ - @Test + @FlakyTest(value = "https://github.com/apache/bookkeeper/issues/4142") @SuppressWarnings("deprecation") public void testBookieServerZKSessionExpireBehaviour() throws Exception { // 6000 is minimum due to default tick time