jojochuang commented on code in PR #8554:
URL: https://github.com/apache/ozone/pull/8554#discussion_r2127124316


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -382,8 +364,35 @@ public void testSnapshotWithFSO() throws Exception {
     SnapshotInfo deletedSnap = om.getMetadataManager()
         .getSnapshotInfoTable().get("/vol1/bucketfso/snap2");
 
+    om.getKeyManager().getDirDeletingService().resume();
+    om.getKeyManager().getDeletingService().resume();
+    for (int i = 1; i <= 3; i++) {
+      String snapshotName = "snap" + i;
+      GenericTestUtils.waitFor(() -> {
+        try {
+          SnapshotInfo snap = 
om.getMetadataManager().getSnapshotInfo(VOLUME_NAME, BUCKET_NAME_FSO, 
snapshotName);
+          LOG.info("SnapshotInfo for {} is {}", snapshotName, 
snap.getSnapshotId());
+          return snap.isDeepCleaned() && snap.isDeepCleanedDeletedDir();
+        } catch (IOException e) {
+          throw new RuntimeException(e);
+        }
+      }, 2000, 100000000);

Review Comment:
   seems too much



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDeletingServiceIntegrationTest.java:
##########
@@ -127,8 +106,7 @@ public void setup() throws Exception {
         500, TimeUnit.MILLISECONDS);
     conf.setBoolean(OZONE_SNAPSHOT_DEEP_CLEANING_ENABLED, true);
     conf.setTimeDuration(OZONE_SNAPSHOT_DELETING_SERVICE_TIMEOUT,
-        10000, TimeUnit.MILLISECONDS);
-    conf.setInt(OMConfigKeys.OZONE_SNAPSHOT_DIRECTORY_SERVICE_INTERVAL, 500);
+        10, TimeUnit.MILLISECONDS);

Review Comment:
   does it work reducing the time interval from 10 seconds to 10 milliseconds?



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -576,7 +574,7 @@ public void 
testAOSKeyDeletingWithSnapshotCreateParallelExecution()
     DirectoryDeletingService dirDeletingService = 
cluster.getOzoneManager().getKeyManager().getDirDeletingService();
     // Suspend KeyDeletingService
     dirDeletingService.suspend();
-    GenericTestUtils.waitFor(() -> !dirDeletingService.isRunningOnAOS(), 1000, 
10000);
+    Thread.sleep(1000);

Review Comment:
   replacing conditional wait with a fixed sleep time can make the test brittle.



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