sadanand48 commented on code in PR #3993:
URL: https://github.com/apache/ozone/pull/3993#discussion_r1031767464
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOmMetadataManager.java:
##########
@@ -689,12 +690,17 @@ public void testListSnapshot() throws Exception {
}
//Test listing snapshots with no volume name.
- Assert.assertThrows(OMException.class, () ->
omMetadataManager.listSnapshot(
- null, null));
+ Assert.assertThrows(OMException.class,
+ () -> omMetadataManager.listSnapshot(null, null));
//Test listing snapshots with no bucket name.
- Assert.assertThrows(OMException.class, () ->
omMetadataManager.listSnapshot(
- vol1, null));
+ Assert.assertThrows(OMException.class,
+ () -> omMetadataManager.listSnapshot(vol1, null));
+
+ //Test listing snapshots with non-existent bucket.
+
+ Assert.assertThrows(OMException.class,
+ () -> omMetadataManager.listSnapshot(vol1, nonexistentBucket));
Review Comment:
nit: we can also verify the error code here.
```suggestion
OzoneTestUtils.expectOmException(BUCKET_NOT_FOUND,
() -> omMetadataManager.listSnapshot(vol1, nonexistentBucket));
```
--
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]