From e80d8449e22c2f3537506ede7a9763d686d750e3 Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Sat, 27 Jun 2026 08:53:28 +0800 Subject: [PATCH] HDDS-15605. Fix flaky testContainerExclusionWithClosedContainerException --- .../ozone/client/rpc/TestFailureHandlingByClient.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java index 4d20d29791ca..01cb7e925444 100644 --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java @@ -394,7 +394,12 @@ public void testContainerExclusionWithClosedContainerException() assertThat(keyOutputStream.getExcludeList().getContainerIds()) .contains(ContainerID.valueOf(containerId)); - assertThat(keyOutputStream.getExcludeList().getDatanodes()).isEmpty(); + // Datanodes are not asserted here. Under the default ALL_COMMITTED watch + // level a slow-but-healthy follower can be recorded in the exclude list, so + // an empty datanode set is not an invariant for this config (the watch + // level is configurable via RatisClientConfig watchType, HDDS-2887). + // Watch-level datanode exclusion is covered by + // testDatanodeExclusionWithMajorityCommit. assertThat(keyOutputStream.getExcludeList().getPipelineIds()).isEmpty(); // The close will just write to the buffer