Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][flaky-test]Fix flaky test in PulsarSinkE2ETest.testPulsarSinkDLQ #16799

Closed
wants to merge 1 commit into from

Conversation

Nicklee007
Copy link
Contributor

Fixes #16578

Motivation

Fix flaky test in PulsarSinkE2ETest.testPulsarSinkDLQ which sometime run failed , because the msg not show in dlqTopic.

Modifications

  1. Wait all msg show in dlqTopic.

Documentation

  • doc-not-needed
    (Please explain why)

@@ -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

@Nicklee007 Nicklee007 closed this Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky-test: PulsarSinkE2ETest.testPulsarSinkDLQ
2 participants