Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ public void testPulsarSinkDLQ() throws Exception {
remainingMessagesToReceive.add(messageBody);
}

// Wait all msg show in dlqTopic.
Awaitility.await().untilAsserted(()-> {
assertEquals(admin.topics().getLastMessageId(dlqTopic).toString(),"10:1:-1:8");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we guarantee that the message-id is the same for every testing? There is an exception in this PR:https://github.com/apache/pulsar/runs/7524494144?check_suite_focus=true#step:10:1231

We can directly modify the wait time for the consumer to receive the message:
https://github.com/apache/pulsar/pull/16799/files#diff-1be1a68c630a114a3f7770115053f58066cbf117b24d0e73903f6340f7aef793L194

And I think the root cause may not be the timeout setting. 10 seconds should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we guarantee that the message-id is the same for every testing? There is an exception in this

seems that you are right

});

//4 All messages should enter DLQ
for (int i = 0; i < totalMsgs; i++) {
Message<String> message = consumer.receive(10, TimeUnit.SECONDS);
Expand Down