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