You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/24 21:40:56 UTC

[GitHub] [hadoop-ozone] avijayanhwx commented on a change in pull request #714: HDDS-3164. Add Recon endpoint to serve missing containers and its metadata.

avijayanhwx commented on a change in pull request #714: HDDS-3164. Add Recon endpoint to serve missing containers and its metadata.
URL: https://github.com/apache/hadoop-ozone/pull/714#discussion_r397471038
 
 

 ##########
 File path: hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/fsck/TestMissingContainerTask.java
 ##########
 @@ -90,15 +102,19 @@ public void testRun() throws Exception {
     missingContainerTask.start();
 
     LambdaTestUtils.await(6000, 1000, () ->
-        (missingContainersTableHandle.findAll().size() == 1));
+        (missingContainersTableHandle.findAll().size() == 2));
     all = missingContainersTableHandle.findAll();
-    Assert.assertEquals(3, all.get(0).getContainerId().longValue());
-
+    // Container IDs 2 and 3 should be present in the missing containers table
+    Set<Long> missingContainerIDs = Collections.unmodifiableSet(
+        new HashSet<>(Arrays.asList(2L, 3L))
+    );
+    Assert.assertTrue(all.stream().allMatch(record ->
+        missingContainerIDs.stream().anyMatch(
 
 Review comment:
   Nit. This may be replaced with something like 
   
   `all.forEach(r -> Assert.assertTrue(missingContainerIDs.contains(r.getContainerId())));`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org