chungen0126 commented on code in PR #3993:
URL: https://github.com/apache/ozone/pull/3993#discussion_r1039314124


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOmMetadataManager.java:
##########
@@ -62,16 +74,26 @@ public class TestOmMetadataManager {
 
   private OMMetadataManager omMetadataManager;
   private OzoneConfiguration ozoneConfiguration;
+  @TempDir
+  private File folder;
 
-  @Rule
-  public TemporaryFolder folder = new TemporaryFolder();
-
+  public static <E extends Throwable> void expectOmException(

Review Comment:
   We need the funtion to verify the error code, or write a try-catch as the 
following:
   ```
       try {
         omMetadataManager.listSnapshot(volume, bucket);
         fail("Should have thrown OMException");
       } catch (OMException oe) {
         assertEquals(expectedResultCode, oe.getResult());
       }
   ```
   Do you think it is better?



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