GeorgeJahad commented on code in PR #3980:
URL: https://github.com/apache/ozone/pull/3980#discussion_r1131556984


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMRatisSnapshots.java:
##########
@@ -537,6 +557,36 @@ public void testInstallCorruptedCheckpointFailure() throws 
Exception {
     Assert.assertTrue(logCapture.getOutput().contains(msg));
   }
 
+  private void createSnapshot(OzoneManager leaderOM, List<String> keys)
+      throws TimeoutException, InterruptedException, IOException {
+    // Avoid double buffer issue waiting for keys
+    GenericTestUtils.waitFor(() -> {
+      try {
+        OmKeyInfo key = leaderOM.getMetadataManager()
+            .getKeyTable(ozoneBucket.getBucketLayout())
+            .getSkipCache(leaderOM.getMetadataManager()
+            .getOzoneKey(volumeName, bucketName, keys.get(0)));
+        return key != null;
+      } catch (Exception e) {
+        return false;
+      }
+    }, 100, 10000);
+    objectStore.createSnapshot(volumeName, bucketName, "snap1");
+
+    // allow the snapshot to be written to the info table
+    GenericTestUtils.waitFor(() -> {
+      try {
+        SnapshotInfo snapshotInfo =

Review Comment:
   done



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