You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by aa...@apache.org on 2022/10/18 08:14:06 UTC
[rocketmq-clients] branch master updated: Bump rocketmq proto to 2.0.1 (#263)
This is an automated email from the ASF dual-hosted git repository.
aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 3ffaf85 Bump rocketmq proto to 2.0.1 (#263)
3ffaf85 is described below
commit 3ffaf858114ad8646c44de5d45d0495eb7934259
Author: Aaron Ai <ya...@gmail.com>
AuthorDate: Tue Oct 18 16:14:00 2022 +0800
Bump rocketmq proto to 2.0.1 (#263)
---
.../apache/rocketmq/client/java/exception/StatusChecker.java | 1 +
.../rocketmq/client/java/exception/StatusCheckerTest.java | 11 +++++++++++
java/pom.xml | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/java/client/src/main/java/org/apache/rocketmq/client/java/exception/StatusChecker.java b/java/client/src/main/java/org/apache/rocketmq/client/java/exception/StatusChecker.java
index 1e5bf4e..6629827 100644
--- a/java/client/src/main/java/org/apache/rocketmq/client/java/exception/StatusChecker.java
+++ b/java/client/src/main/java/org/apache/rocketmq/client/java/exception/StatusChecker.java
@@ -59,6 +59,7 @@ public class StatusChecker {
case UNRECOGNIZED_CLIENT_TYPE:
case MESSAGE_CORRUPTED:
case CLIENT_ID_REQUIRED:
+ case ILLEGAL_POLLING_TIME:
throw new BadRequestException(codeNumber, requestId, statusMessage);
case UNAUTHORIZED:
throw new UnauthorizedException(codeNumber, requestId, statusMessage);
diff --git a/java/client/src/test/java/org/apache/rocketmq/client/java/exception/StatusCheckerTest.java b/java/client/src/test/java/org/apache/rocketmq/client/java/exception/StatusCheckerTest.java
index 5076203..13ec8e3 100644
--- a/java/client/src/test/java/org/apache/rocketmq/client/java/exception/StatusCheckerTest.java
+++ b/java/client/src/test/java/org/apache/rocketmq/client/java/exception/StatusCheckerTest.java
@@ -274,6 +274,17 @@ public class StatusCheckerTest extends TestBase {
// ignore on purpose
}
}
+
+ {
+ Status status = Status.newBuilder().setCode(Code.ILLEGAL_POLLING_TIME).build();
+ RpcFuture<Object, Object> invocation = new RpcFuture<>(context, null, Futures.immediateFuture(response));
+ try {
+ StatusChecker.check(status, invocation);
+ fail();
+ } catch (BadRequestException ignore) {
+ // ignore on purpose
+ }
+ }
}
@Test
diff --git a/java/pom.xml b/java/pom.xml
index da38bc0..804e566 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -47,7 +47,7 @@
~ 1. Whether it is essential, because the current shaded jar is fat enough.
~ 2. Make sure that it is compatible with Java 8.
-->
- <rocketmq-proto.version>2.0.0</rocketmq-proto.version>
+ <rocketmq-proto.version>2.0.1</rocketmq-proto.version>
<annotations-api.version>6.0.53</annotations-api.version>
<protobuf.version>3.19.2</protobuf.version>
<grpc.version>1.47.0</grpc.version>