SaketaChalamchala commented on code in PR #10726:
URL: https://github.com/apache/ozone/pull/10726#discussion_r3606011608
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/service/TestDirectoryDeletingServiceWithFSO.java:
##########
@@ -659,23 +659,7 @@ public void
testAOSKeyDeletingWithSnapshotCreateParallelExecution()
service.runPeriodicalTaskNow();
store.deleteSnapshot(testVolumeName, testBucketName, snap1);
cluster.getOzoneManager().awaitDoubleBufferFlush();
- cluster.restartOzoneManager();
- cluster.waitForClusterToBeReady();
- cluster.getOzoneManager().awaitDoubleBufferFlush();
- SnapshotDeletingService snapshotDeletingService =
- cluster.getOzoneManager().getKeyManager().getSnapshotDeletingService();
- GenericTestUtils.waitFor(() -> {
- try {
- snapshotDeletingService.runPeriodicalTaskNow();
- cluster.getOzoneManager().awaitDoubleBufferFlush();
- long currentSnapshotCount =
cluster.getOzoneManager().getMetadataManager()
-
.countRowsInTable(cluster.getOzoneManager().getMetadataManager().getSnapshotInfoTable());
- return currentSnapshotCount <= initialSnapshotCount;
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }, 100, 10000);
-
assertTableRowCount(cluster.getOzoneManager().getMetadataManager().getSnapshotInfoTable(),
initialSnapshotCount);
+ waitForSnapshotsPurged(snapshotInfoTable, initialSnapshotCount);
dirDeletingService.resume();
Review Comment:
Thanks for the patch @jojochuang . It might be better to move
`waitForSnapshotsPurged` and `dirDeletingService.resume()` if suspended to the
test teardown method `cleanup`
--
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]