sodonnel commented on code in PR #5324:
URL: https://github.com/apache/ozone/pull/5324#discussion_r1338876307


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestContainerReader.java:
##########
@@ -378,11 +406,83 @@ public void testMultipleContainerReader() throws 
Exception {
         " costs " + (System.currentTimeMillis() - startTime) / 1000 + "s");
     Assert.assertEquals(containerCount,
         containerSet.getContainerMap().entrySet().size());
+    Assert.assertEquals(volumeSet.getFailedVolumesList().size(), 0);
+
+    // One of the conflict01 or conflict02 should have had its container path
+    // removed.
+    List<Path> paths = new ArrayList<>();
+    paths.add(Paths.get(conflict01.getContainerData().getContainerPath()));
+    paths.add(Paths.get(conflict02.getContainerData().getContainerPath()));
+    int exist = 0;
+    for (Path p : paths) {
+      if (Files.exists(p)) {
+        exist++;
+      }
+    }
+    Assert.assertEquals(1, exist);
+    Assert.assertTrue(paths.contains(Paths.get(
+        containerSet.getContainer(0).getContainerData().getContainerPath())));
+

Review Comment:
   I wasn't sure what you were suggesting here, but I added in a few extra 
assertions on the container stored in the set.



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