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 072159599ff..b5d79d6c0ae 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 void testNotification() throws Exception { CompletableFuture future1 = client.notification(brokerAddr, topic, group, messageQueue.getQueueId(), pollTime, System.currentTimeMillis(), 5000); CompletableFuture 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 void testNotificationOrderly() throws Exception { 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();