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


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOzoneManagerHA.java:
##########
@@ -336,12 +337,11 @@ protected void createVolumeTest(boolean checkSuccess) 
throws Exception {
         // ConnectException. Otherwise, we would get a RemoteException from the
         // last running OM as it would fail to get a quorum.
         if (e instanceof RemoteException) {
-          GenericTestUtils.assertExceptionContains("OMNotLeaderException", e);
+          assertThat(e).hasMessageContaining("OMNotLeaderException");

Review Comment:
   So we should either:
   
   ```
   assertThat(e.toString()).contains("OMNotLeaderException");
   ```
   
   or:
   
   ```
   assertThat(e).hasMessageContaining("is not the leader");
   ```



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