You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/12/21 14:29:10 UTC

Re: [PR] HDDS-9170. Replace GenericTestUtils#assertExceptionContains with AssertJ#assertThat [ozone]

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


##########
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:
   Looks like old and new code work differently, and test may fail with:
   
   ```
   Expecting:
    <"OM:omNode-3 is not the leader. Could not determine the leader node.
   	at org.apache.hadoop.ozone.om.OzoneManager.checkLeaderStatus(OzoneManager.java:4144)
   	at org.apache.hadoop.ozone.om.ratis.utils.OzoneManagerRatisUtils.checkLeaderStatus(OzoneManagerRatisUtils.java:485)
   	at org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.internalProcessRequest(OzoneManagerProtocolServerSideTranslatorPB.java:217)
   	at org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.processRequest(OzoneManagerProtocolServerSideTranslatorPB.java:171)
   	at org.apache.hadoop.hdds.server.OzoneProtocolMessageDispatcher.processRequest(OzoneProtocolMessageDispatcher.java:89)
   	at org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB.submitRequest(OzoneManagerProtocolServerSideTranslatorPB.java:[162](https://github.com/apache/ozone/actions/runs/7288115214/job/19860713339?pr=5844#step:6:163))
   	at org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos$OzoneManagerService$2.callBlockingMethod(OzoneManagerProtocolProtos.java)
   	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.processCall(ProtobufRpcEngine.java:484)
   	at org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:595)
   	at org.apache.hadoop.ipc.ProtobufRpcEngine2$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:573)
   	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1227)
   	at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1094)
   	at org.apache.hadoop.ipc.Server$RpcCall.run(Server.java:1017)
   	at java.security.AccessController.doPrivileged(Native Method)
   	at javax.security.auth.Subject.doAs(Subject.java:422)
   	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
   	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:3048)
   ">
   to contain:
    <"OMNotLeaderException"> 
   	at org.apache.hadoop.ozone.om.TestOzoneManagerHA.createKeyTest(TestOzoneManagerHA.java:448)
   ```
   
   https://github.com/apache/ozone/actions/runs/7288115214/job/19860713339?pr=5844#step:6:158



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org