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


##########
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:
   Yes, you are right. I just figured that it is an issue with 
`exception.toString()` and `exception.getMessage()`.
   
   Changed it to:
   ```
             assertThat(e).hasMessageContaining("Could not determine the leader 
node.");
   ```



##########
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:
   Yes, you are right. I just figured that it is an issue with 
`exception.toString()` and `exception.getMessage()`.
   
   Changed it to:
   ```
   assertThat(e).hasMessageContaining("Could not determine the leader node.");
   ```



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