ChenSammi commented on code in PR #8360:
URL: https://github.com/apache/ozone/pull/8360#discussion_r2076946983


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestContainerReader.java:
##########
@@ -229,21 +239,23 @@ public void testContainerReader(ContainerTestVersionInfo 
versionInfo)
     recoveringKeyValueContainer.create(
         volumeSet, volumeChoosingPolicy, clusterId);
 
-    ContainerReader containerReader = new ContainerReader(volumeSet,
-        hddsVolume, containerSet, conf, true);
-
-    Thread thread = new Thread(containerReader);
+    thread = new Thread(containerReader);
     thread.start();
     thread.join();
 
+    // no change, only open containers have committed space
+    assertEquals(originalCommittedBytes, hddsVolume.getCommittedBytes());
+
     // Ratis replicated recovering containers are deleted upon datanode startup
     if (recoveringKeyValueContainer.getContainerData().getReplicaIndex() == 0) 
{
       
assertNull(containerSet.getContainer(recoveringContainerData.getContainerID()));
       assertEquals(2, containerSet.containerCount());
     } else {
       //recovering container should be marked unhealthy, so the count should 
be 3
-      assertEquals(UNHEALTHY, containerSet.getContainer(
-          recoveringContainerData.getContainerID()).getContainerState());
+      Container c = containerSet.getContainer(

Review Comment:
   Looks like the recoveringContainerData replicationIndex is not explicitly 
set, which means it's 0. 
   
   So this else branch doesn't have the chance to get executed.  Besides, L258 
conflicts with L278. 



-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to