ashishkumar50 commented on code in PR #4340:
URL: https://github.com/apache/ozone/pull/4340#discussion_r1141784588


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestHddsVolume.java:
##########
@@ -369,6 +369,23 @@ public void testDbStoreClosedOnBadVolumeWithDbVolumes() 
throws IOException {
     assertEquals(0, DatanodeStoreCache.getInstance().size());
   }
 
+  @Test
+  public void testFailedVolumeSpace() throws IOException {
+
+    // Build failed volume
+    HddsVolume volume = volumeBuilder.failedVolume(true).build();
+
+    // In case of failed volume all stats should return 0.
+    assertEquals(0, volume.getVolumeInfoStats().getUsed());
+    assertEquals(0, volume.getVolumeInfoStats().getAvailable());
+    assertEquals(0, volume.getVolumeInfoStats().getCapacity());
+    assertEquals(0, volume.getVolumeInfoStats().getReserved());
+    assertEquals(0, volume.getVolumeInfoStats().getTotalCapacity());
+
+    // Shutdown the volume.
+    volume.shutdown();

Review Comment:
   Hi @adoroszlai , Thanks for the review. All the comments have been fixed.



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