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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestContainerOperations.java:
##########
@@ -203,7 +203,8 @@ public void testDatanodeUsageInfoContainerCount() throws 
Exception {
                       dn.getIpAddress(), dn.getUuidString());
 
       assertEquals(1, usageInfoList.size());
-      assertEquals(expected, usageInfoList.get(0).getContainerCount());
+      assertThat(usageInfoList.get(0).getContainerCount())
+          .isGreaterThanOrEqualTo(expected);

Review Comment:
   The test makes two different calls to SCM that each return data about 
containers for a specific datanode.  They both use the same ultimate source of 
container list.  SCM collects info from datanodes in the background 
(incremental container report and heartbeat).  So if a container gets created 
by a previous test case, it may be added to SCM's list between the two calls.
   
   We could add `waitFor`, but would need to repeat both calls, since no matter 
which one we choose as the reference (first call), the second call may return 
the same number or more.



-- 
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