This is an automated email from the ASF dual-hosted git repository.

lizhimin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new c727f3a069 Fix notification integration test in pop consume mode 
(#7947)
c727f3a069 is described below

commit c727f3a069cf04d0504ab812b8f3533ce55886b2
Author: Zhouxiang Zhan <[email protected]>
AuthorDate: Wed Mar 20 11:05:02 2024 +0800

    Fix notification integration test in pop consume mode (#7947)
---
 .../rocketmq/test/client/consumer/pop/NotificationIT.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/test/src/test/java/org/apache/rocketmq/test/client/consumer/pop/NotificationIT.java
 
b/test/src/test/java/org/apache/rocketmq/test/client/consumer/pop/NotificationIT.java
index 072159599f..b5d79d6c0a 100644
--- 
a/test/src/test/java/org/apache/rocketmq/test/client/consumer/pop/NotificationIT.java
+++ 
b/test/src/test/java/org/apache/rocketmq/test/client/consumer/pop/NotificationIT.java
@@ -58,12 +58,12 @@ public class NotificationIT extends BasePop {
         CompletableFuture<Boolean> future1 = client.notification(brokerAddr, 
topic, group, messageQueue.getQueueId(), pollTime, System.currentTimeMillis(), 
5000);
         CompletableFuture<Boolean> future2 = client.notification(brokerAddr, 
topic, group, messageQueue.getQueueId(), pollTime, System.currentTimeMillis(), 
5000);
         sendMessage(1);
-        Boolean result1 = future1.get();
-        assertThat(result1).isTrue();
-        client.popMessageAsync(brokerAddr, messageQueue, 10000, 1, group, 
1000, false,
-            ConsumeInitMode.MIN, false, null, null);
         Boolean result2 = future2.get();
-        assertThat(result2).isFalse();
+        assertThat(result2).isTrue();
+        client.popMessageAsync(brokerAddr, messageQueue, 10000, 1, group, 
1000, false,
+            ConsumeInitMode.MIN, false, null, null).get();
+        Boolean result1 = future1.get();
+        assertThat(result1).isFalse();
     }
 
     @Test
@@ -76,7 +76,7 @@ public class NotificationIT extends BasePop {
         Boolean result1 = future1.get();
         assertThat(result1).isTrue();
         client.popMessageAsync(brokerAddr, messageQueue, 10000, 1, group, 
1000, false,
-            ConsumeInitMode.MIN, true, null, null, attemptId);
+            ConsumeInitMode.MIN, true, null, null, attemptId).get();
         Boolean result2 = future2.get();
         assertThat(result2).isTrue();
 

Reply via email to