hemantk-12 commented on code in PR #8157: URL: https://github.com/apache/ozone/pull/8157#discussion_r2035945168
########## hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotManager.java: ########## @@ -113,16 +119,37 @@ void init(@TempDir File tempDir) throws Exception { OMConfigKeys.OZONE_OM_SNAPSHOT_CACHE_MAX_SIZE, 1); configuration.setBoolean( OMConfigKeys.OZONE_OM_SNAPSHOT_ROCKSDB_METRICS_ENABLED, false); + // Allow 2 fs snapshots + configuration.setInt( + OMConfigKeys.OZONE_OM_FS_SNAPSHOT_MAX_LIMIT, 2); OmTestManagers omTestManagers = new OmTestManagers(configuration); om = omTestManagers.getOzoneManager(); + omMetadataManager = (OmMetadataManagerImpl) om.getMetadataManager(); + omSnapshotManager = om.getOmSnapshotManager(); + snapshotChainManager = omMetadataManager.getSnapshotChainManager(); } @AfterAll void stop() { om.stop(); } + @AfterEach + void cleanup() throws IOException { + Table<String, SnapshotInfo> snapshotInfoTable = omMetadataManager.getSnapshotInfoTable(); Review Comment: No, currently you are just deleting entries directly from the SnapshotInfoTable and chain. Ideally, we should issue a delete snapshot (like [this](https://github.com/apache/ozone/blob/master/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOmSnapshot.java#L1820)) for all the snapshots, and wait for `SnapshotInfoTable` to be empty. -- 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