hemantk-12 commented on code in PR #8157:
URL: https://github.com/apache/ozone/pull/8157#discussion_r2024030779


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshotManager.java:
##########
@@ -228,6 +231,52 @@ public void testCloseOnEviction() throws IOException,
     GenericTestUtils.waitFor(() -> {
       return logCapture.getOutput().contains(msg);
     }, 100, 30_000);
+
+    // clean up all snapshot
+    snapshotChainManager.deleteSnapshot(second);
+    snapshotChainManager.deleteSnapshot(first);
+    assertEquals(snapshotChainManager.getGlobalSnapshotChain().size(), 0);
+  }
+
+  @Test
+  public void testValidateSnapshotLimit() throws IOException {
+    Table<String, OmVolumeArgs> volumeTable = mock(Table.class);
+    Table<String, OmBucketInfo> bucketTable = mock(Table.class);
+    Table<String, SnapshotInfo> snapshotInfoTable = mock(Table.class);
+    HddsWhiteboxTestUtils.setInternalState(
+        om.getMetadataManager(), VOLUME_TABLE, volumeTable);
+    HddsWhiteboxTestUtils.setInternalState(
+        om.getMetadataManager(), BUCKET_TABLE, bucketTable);
+    HddsWhiteboxTestUtils.setInternalState(
+        om.getMetadataManager(), SNAPSHOT_INFO_TABLE, snapshotInfoTable);
+
+    om.getOmSnapshotManager().setFsSnapshotMaxLimit(2);

Review Comment:
   Nah, I don't want that. I was thinking if we could load a new config every 
time a test runs.



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