adoroszlai commented on code in PR #5850:
URL: https://github.com/apache/ozone/pull/5850#discussion_r1434999402


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerPrepare.java:
##########
@@ -296,7 +297,7 @@ public void testPrepareWithMultipleThreads() throws 
Exception {
               .anyMatch((vol) -> vol.getName().equals(volumeName)));
         } catch (ExecutionException ex) {
           Throwable cause = ex.getCause();
-          assertTrue(cause instanceof OMException);
+          assertInstanceOf(OMException.class, cause);
           assertEquals(
               NOT_SUPPORTED_OPERATION_WHEN_PREPARED,
               ((OMException) cause).getResult());

Review Comment:
   We can simplify this as:
   
   ```java
   OMException cause = assertInstanceOf(OMException.class, cause);
   assertEquals(NOT_SUPPORTED_OPERATION_WHEN_PREPARED, cause.getResult());
   ```



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