From d1119b13089ec12e9230d5764140cad394c78b60 Mon Sep 17 00:00:00 2001 From: Siyao Meng <50227127+smengcl@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:18:37 -0700 Subject: [PATCH] HDDS-15823. Fix flaky TestFailureHandlingByClient#testContainerExclusionWithClosedContainerException Remove the getPipelineIds().isEmpty() assertion, which is not an invariant under the default ALL_COMMITTED watch level: a WATCH RaftRetryFailureException takes the else branch in KeyOutputStream.handleException and adds the pipeline to the exclude list. The container-id exclusion assertion, the actual property under test, is kept. Follow-up to HDDS-15605, which removed the analogous datanodes assertion. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../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 01cb7e92544..045bddf9d7b 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 @@ -400,7 +400,12 @@ public void testContainerExclusionWithClosedContainerException() // level is configurable via RatisClientConfig watchType, HDDS-2887). // Watch-level datanode exclusion is covered by // testDatanodeExclusionWithMajorityCommit. - assertThat(keyOutputStream.getExcludeList().getPipelineIds()).isEmpty(); + // Pipeline IDs are also not asserted here. Under ALL_COMMITTED a WATCH + // RaftRetryFailureException can fire (retryFailure=true) before the + // ClosedContainerException path runs; that takes the else-branch in + // KeyOutputStream.handleException and adds the pipeline to the exclude + // list, so an empty pipeline set is not an invariant for this config. + // The container-id assertion above is the actual property under test. // The close will just write to the buffer }