arunsarin85 opened a new pull request, #11212:
URL: https://github.com/apache/ozone/pull/11212

   ## What changes were proposed in this pull request?
   
   Addresses review comments on #10726 (jojochuang's original patch for 
HDDS-15828).
   Previously, `testAOSKeyDeletingWithSnapshotCreateParallelExecution` 
suspended both
   `SnapshotDeletingService` and `DirectoryDeletingService` but only resumed 
them on the
   success path. If an assertion failed before the resume calls, later tests in 
the shared
   static cluster ran with services still suspended, causing cascading 
flakiness.
   
   Please describe your PR in detail:
   - Add three instance fields (`snapshotCountAfterTest`, `pendingResumeDds`,
     `needsTableCleanup`) to track per-test cleanup state.
   - Expand `@AfterEach cleanup()` to: resume `SnapshotDeletingService` (via
     `waitForSnapshotsPurged`) and `DirectoryDeletingService` if suspended, and
     call `cleanupTables()` if needed — guaranteeing cleanup runs even on test 
failure.
   - Move the end-of-test `waitForSnapshotsPurged` + 
`dirDeletingService.resume()` calls
     out of `testAOSKeyDeletingWithSnapshotCreateParallelExecution` and into 
`@AfterEach`.
   - Move the end-of-test `waitForSnapshotsPurged` + `cleanupTables()` calls
     out of `testDirDeletedTableCleanUpForSnapshot` and into `@AfterEach`.
   - Remove the redundant `awaitDoubleBufferFlush()` before 
`waitForSnapshotsPurged`
     in `testDirDeletedTableCleanUpForSnapshot` (suggested by 
SaketaChalamchala).
   - Fix mis-indented try/catch braces in the `waitForSnapshotsPurged` lambda 
(checkstyle).
   - Remove the redundant `assertTableRowCount` after `waitFor` in 
`waitForSnapshotsPurged`
     — `waitFor` already guarantees the condition before returning, calling it 
again
     doubles the potential wait time (up to 4 minutes on slow runs).
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15828
   
   ## How was this patch tested?
   
   https://github.com/arunsarin85/ozone/actions/runs/33992835360
   


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