From 3fd43d06b4f3b582ada03f1acbc2a1fcaf646f7a Mon Sep 17 00:00:00 2001 From: amaliujia Date: Fri, 24 Jul 2026 11:52:34 +0800 Subject: [PATCH 1/2] HDDS-15956. Fix Flaky TestClientRetryTimeout. --- .../hadoop/ozone/client/rpc/TestClientRetryTimeout.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java index 1c08b169c8b5..e9a8dbd66ec3 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java @@ -62,6 +62,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.TestMethodOrder; +import org.junit.jupiter.api.Timeout; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -83,6 +84,7 @@ */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) +@Timeout(600) public class TestClientRetryTimeout { private static final Logger LOG = @@ -150,6 +152,7 @@ public void init() throws Exception { ratisClient.setExponentialPolicyBaseSleep(Duration.ofMillis(500)); ratisClient.setExponentialPolicyMaxSleep(Duration.ofSeconds(1)); ratisClient.setExponentialPolicyMaxRetries(1); + ratisClient.setMultilinearPolicy("500ms, 2"); conf.setFromObject(ratisClient); RatisClientConfig.RaftConfig raftClient = @@ -178,6 +181,9 @@ public void init() throws Exception { cluster = MiniOzoneCluster.newBuilder(conf) .setNumDatanodes(7) .build(); + // Seven datanodes plus multiple pipelines can exceed the 120s default on + // a loaded CI runner. + cluster.setWaitForClusterToBeReadyTimeout(180000); cluster.waitForClusterToBeReady(); cluster.waitForPipelineTobeReady(HddsProtos.ReplicationFactor.THREE, 180000); From 7709cc444f8f92f8f47f2efd4748fb8c09ac64e3 Mon Sep 17 00:00:00 2001 From: amaliujia Date: Fri, 24 Jul 2026 13:05:52 +0800 Subject: [PATCH 2/2] update --- .../hadoop/ozone/client/rpc/TestClientRetryTimeout.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java index e9a8dbd66ec3..7affac87db95 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestClientRetryTimeout.java @@ -84,7 +84,7 @@ */ @TestInstance(TestInstance.Lifecycle.PER_CLASS) @TestMethodOrder(MethodOrderer.OrderAnnotation.class) -@Timeout(600) +@Timeout(900) public class TestClientRetryTimeout { private static final Logger LOG = @@ -181,9 +181,9 @@ public void init() throws Exception { cluster = MiniOzoneCluster.newBuilder(conf) .setNumDatanodes(7) .build(); - // Seven datanodes plus multiple pipelines can exceed the 120s default on - // a loaded CI runner. - cluster.setWaitForClusterToBeReadyTimeout(180000); + // waitForClusterToBeReady runs waitForSCMToBeReady and then waits for all + // datanodes and safe mode; each step can use the full budget. + cluster.setWaitForClusterToBeReadyTimeout(300000); cluster.waitForClusterToBeReady(); cluster.waitForPipelineTobeReady(HddsProtos.ReplicationFactor.THREE, 180000);