aryangupta1998 commented on a change in pull request #1620:
URL: https://github.com/apache/ozone/pull/1620#discussion_r530362013



##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/TestBlockDeletingService.java
##########
@@ -240,40 +270,37 @@ public void testBlockDeletion() throws Exception {
           .get(containerData.get(0).getContainerID()).getContainerData())
           .getDeleteTransactionId();
 
-
+      long containerSpace = containerData.get(0).getBytesUsed();
       // Number of deleted blocks in container should be equal to 0 before
       // block delete
+
       Assert.assertEquals(0, transactionId);
 
       // Ensure there are 3 blocks under deletion and 0 deleted blocks
       Assert.assertEquals(3, getUnderDeletionBlocksCount(meta));
-      Assert.assertEquals(3,
-          meta.getStore().getMetadataTable()
-                  .get(OzoneConsts.PENDING_DELETE_BLOCK_COUNT).longValue());
-      Assert.assertEquals(0, getDeletedBlocksCount(meta));
+      Assert.assertEquals(3, meta.getStore().getMetadataTable()
+          .get(OzoneConsts.PENDING_DELETE_BLOCK_COUNT).longValue());
+
+      // Container contains 3 blocks. So, space used by the container
+      // should be greater than zero.
+      Assert.assertTrue(containerSpace > 0);
 
       // An interval will delete 1 * 2 blocks
       deleteAndWait(svc, 1);

Review comment:
       Added.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to