sadanand48 commented on code in PR #4178:
URL: https://github.com/apache/ozone/pull/4178#discussion_r1072078208


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOmSnapshot.java:
##########
@@ -463,6 +464,95 @@ public void testSnapDiff() throws Exception {
 
   }
 
+  @Test
+  public void testSnapDiffNoSnapshot() throws Exception {
+    String volume = "vol-" + RandomStringUtils.randomNumeric(5);
+    String bucket = "buck-" + RandomStringUtils.randomNumeric(5);
+    store.createVolume(volume);
+    OzoneVolume volume1 = store.getVolume(volume);
+    volume1.createBucket(bucket);
+    OzoneBucket bucket1 = volume1.getBucket(bucket);
+    // Create Key1 and take snapshot
+    String key1 = "key-1-";
+    createFileKey(bucket1, key1);
+    String snap1 = "snap" + RandomStringUtils.randomNumeric(5);
+    createSnapshot(volume, bucket, snap1);
+    String snap2 = "snap" + RandomStringUtils.randomNumeric(5);
+    // Destination snapshot is invalid
+    LambdaTestUtils.intercept(OMException.class,
+            "KEY_NOT_FOUND",

Review Comment:
   If snapshot doesn't exist then it needs to show Snapshot not found and same 
for bucket I guess. Maybe we can file a jira to improve exception handling here?



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