Github user lizhanhui commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/114#discussion_r120556852
--- Diff:
test/src/main/java/org/apache/rocketmq/test/listener/AbstractListener.java ---
@@ -95,6 +95,28 @@ public void stopRecv() {
return sendMsgs;
}
+ public long waitForMessageConsume(int size,
+ int timeoutMills) {
+
+ long curTime = System.currentTimeMillis();
+ while (true) {
+ if (msgBodys.getDataSize() >= size) {
+ break;
+ }
+ if (System.currentTimeMillis() - curTime >= timeoutMills) {
+ logger.error(String.format("timeout but [%s] not recv
all send messages!",
--- End diff --
but [%s] not recv all send messages! --> but [%] did not receive all
messages sent!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---