neils-dev commented on a change in pull request #2183:
URL: https://github.com/apache/ozone/pull/2183#discussion_r628661916



##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/testutils/BlockDeletingServiceTestImpl.java
##########
@@ -80,6 +80,7 @@ public void start() {
           break;
         }
         Future<?> future = this.getExecutorService().submit(svc);
+

Review comment:
       Left over from previous additions to `BlockDeletingServiceTestImpl` - 
unnecessary and removed.

##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/TestSchemaOneBackwardsCompatibility.java
##########
@@ -279,6 +288,8 @@ public void testDelete() throws Exception {
               refCountedDB.getStore().getMetadataTable();
       assertEquals(expectedRegularBlocks + expectedDeletingBlocks,
               (long)metadataTable.get(OzoneConsts.BLOCK_COUNT));
+    //} catch(IOException ex) {

Review comment:
       unnecessary, removed.

##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/TestBlockDeletingService.java
##########
@@ -713,9 +723,14 @@ public void testBlockThrottle() throws Exception {
       // - current total space of container(it will be zero as all blocks
       // in all the containers are deleted)).
       deleteAndWait(service, 2);
-      Assert.assertEquals(blocksPerContainer * containerCount * blockSpace,
-          (totalContainerSpace - currentBlockSpace(containerData,
-              containerCount)));
+
+      long totalContainerBlocks = blocksPerContainer*containerCount;
+      GenericTestUtils.waitFor(() ->
+              totalContainerBlocks*blockSpace ==
+                      (totalContainerSpace-
+                              currentBlockSpace(containerData, 
containerCount)),

Review comment:
       change added.

##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/TestBlockDeletingService.java
##########
@@ -702,9 +709,12 @@ public void testBlockThrottle() throws Exception {
       // Deleted space of 10 blocks should be equal to (initial total space
       // of container - current total space of container).
       deleteAndWait(service, 1);
-      Assert.assertEquals(blockLimitPerInterval * blockSpace,
-          (totalContainerSpace - currentBlockSpace(containerData,
-              containerCount)));
+
+      GenericTestUtils.waitFor(() ->
+              blockLimitPerInterval*blockSpace ==
+                      (totalContainerSpace-
+                              currentBlockSpace(containerData, 
containerCount)),
+              100, 3000);

Review comment:
       change added.

##########
File path: 
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/TestBlockDeletingService.java
##########
@@ -447,6 +447,8 @@ public void testBlockDeletion() throws Exception {
       // An interval will delete 1 * 2 blocks
       deleteAndWait(svc, 1);
 
+      GenericTestUtils.waitFor(() ->
+              containerData.get(0).getBytesUsed() < 3, 100, 3000);

Review comment:
       Thanks @lokeshj1703 - `dfConf.setBlockDeletionLimit` corrected from 3 to 
2 for test.  Setting conditional check to equiv 100 
(`containerData.get(0).getBytesUsed() == containerSpace / 3`).




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