arunsarin85 commented on code in PR #11212:
URL: https://github.com/apache/ozone/pull/11212#discussion_r3972223917


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -149,7 +154,21 @@ public static void teardown() {
   }
 
   @AfterEach
-  public void cleanup() throws InterruptedException, TimeoutException {
+  public void cleanup() throws Exception {
+    if (snapshotCountAfterTest >= 0) {
+      Table<String, SnapshotInfo> snapshotInfoTable =
+          
cluster.getOzoneManager().getMetadataManager().getSnapshotInfoTable();
+      waitForSnapshotsPurged(snapshotInfoTable, snapshotCountAfterTest);
+      snapshotCountAfterTest = -1;
+    }
+    if (pendingResumeDds != null) {

Review Comment:
   The snapshot-wait + snapshot-delete block is now in try/finally. 
pendingResumeDds.resume() and cleanupTables() are in the finally block, so they 
execute unconditionally even if waitForSnapshotsPurged times out or throws.



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