adoroszlai commented on code in PR #11470:
URL: https://github.com/apache/ozone/pull/11470#discussion_r4241898132


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestCloseContainer.java:
##########
@@ -199,9 +199,9 @@ public void testCloseClosedContainer()
       GenericTestUtils.waitFor(() -> containerChecksumFileExists(hddsDatanode, 
container.getContainerID()), 100, 5000);
     }
 
-    for (ContainerReplica replica : getContainerReplicas(container)) {
-      assertNotEquals(0, replica.getDataChecksum());
-    }
+    // Wait for SCM to receive container reports with non-zero checksums for 
all replicas
+    GenericTestUtils.waitFor(() -> getContainerReplicas(container).stream()
+        .allMatch(r -> r.getDataChecksum() != 0), 200, 5000);

Review Comment:
   This is duplicated from another test case.  While focused fix is great, 
extracting it to a function would have been nice.  Maybe next time.
   
   
https://github.com/apache/ozone/blob/92fc0f56dc3f7b76dc807afab4b560df2f0155cb/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestCloseContainer.java#L277-L281
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to