Skip to content

Commit

Permalink
Fix notification integration test in pop consume mode (apache#7947)
Browse files Browse the repository at this point in the history
  • Loading branch information
drpmma authored Mar 20, 2024
1 parent 1b63e8e commit c727f3a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ public void testNotification() throws Exception {
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
Expand All @@ -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();

Expand Down

0 comments on commit c727f3a

Please sign in to comment.