devmadhuu commented on code in PR #7149:
URL: https://github.com/apache/ozone/pull/7149#discussion_r1754459739


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/recon/TestReconTasks.java:
##########
@@ -272,7 +285,17 @@ public void testEmptyMissingContainerDownNode() throws 
Exception {
                   ContainerSchemaDefinition.UnHealthyContainerStates.
                       EMPTY_MISSING,
                   0, 1000);
-      return (allEmptyMissingContainers.isEmpty());
+
+
+      Map<ContainerSchemaDefinition.UnHealthyContainerStates, Map<String, 
Long>>
+          unhealthyContainerStateStatsMap = reconScm.getContainerHealthTask()
+          .getUnhealthyContainerStateStatsMap();
+
+      // Return true if the size of the fetched containers is 0 and the log 
shows 0 for EMPTY_MISSING state
+      return allEmptyMissingContainers.size() == 0 &&
+          unhealthyContainerStateStatsMap.get(
+                  
ContainerSchemaDefinition.UnHealthyContainerStates.EMPTY_MISSING)
+              .getOrDefault(CONTAINER_COUNT, 0L) == 0;

Review Comment:
   Shouldn't we check the `CONTAINER_COUNT` for `MISSING` state after we added 
keys in container ? We did already for EMPTY_MISSING above.. Let's do in next 
PR.



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