diff --git a/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java b/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java index c76d0c734a0..e3cc01a58db 100644 --- a/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java @@ -389,7 +389,7 @@ public void testCreatePlainAccessConfig_Exception() throws InterruptedException, try { mqClientAPI.createPlainAccessConfig(brokerAddr, config, 3 * 1000); } catch (MQClientException ex) { - assertThat(ex.getResponseCode()).isEqualTo(209); + assertThat(ex.getResponseCode()).isEqualTo(ResponseCode.UPDATE_AND_CREATE_ACL_CONFIG_FAILED); assertThat(ex.getErrorMessage()).isEqualTo("corresponding to accessConfig has been updated failed"); } } @@ -419,7 +419,7 @@ public void testDeleteAccessConfig_Exception() throws InterruptedException, Remo try { mqClientAPI.deleteAccessConfig(brokerAddr, "11111", 3 * 1000); } catch (MQClientException ex) { - assertThat(ex.getResponseCode()).isEqualTo(210); + assertThat(ex.getResponseCode()).isEqualTo(ResponseCode.DELETE_ACL_CONFIG_FAILED); assertThat(ex.getErrorMessage()).isEqualTo("corresponding to accessConfig has been deleted failed"); } } diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/ResponseCode.java b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/ResponseCode.java index b19355487e5..a77f4d406e0 100644 --- a/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/ResponseCode.java +++ b/remoting/src/main/java/org/apache/rocketmq/remoting/protocol/ResponseCode.java @@ -72,12 +72,6 @@ public class ResponseCode extends RemotingSysResponseCode { public static final int NO_MESSAGE = 208; - public static final int UPDATE_AND_CREATE_ACL_CONFIG_FAILED = 209; - - public static final int DELETE_ACL_CONFIG_FAILED = 210; - - public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211; - public static final int POLLING_FULL = 209; public static final int POLLING_TIMEOUT = 210; @@ -90,6 +84,12 @@ public class ResponseCode extends RemotingSysResponseCode { public static final int FLOW_CONTROL = 215; + public static final int UPDATE_AND_CREATE_ACL_CONFIG_FAILED = 216; + + public static final int DELETE_ACL_CONFIG_FAILED = 217; + + public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 218; + public static final int NOT_LEADER_FOR_QUEUE = 501; public static final int ILLEGAL_OPERATION = 604; @@ -134,4 +134,5 @@ public class ResponseCode extends RemotingSysResponseCode { public static final int USER_NOT_EXIST = 3001; public static final int POLICY_NOT_EXIST = 3002; + }