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


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

Review Comment:
   Suggestion is to use Junit-5. We already have [Junit-5 dependency in 
Ozone-manager](https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/pom.xml#L211-L215).
 You don't need @RunWith in Junit-5. You can use 
[TestOzoneManagerDoubleBuffer](https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBuffer.java#L180)
 for reference. 
   
   You have to do following changes along with test:
   1. Change [@Before to 
@BeforeEach](https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBuffer.java#L77).
   2. Change [@After to 
@AfterEach](https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBuffer.java#L128).
   3. Change [@Rule to 
@TempDir](https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/ratis/TestOzoneManagerDoubleBuffer.java#L74).
   
   Rest of the tests will work as it is.
   



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