Skip to content

[fix][flaky-test] PersistentStreamingDispatcherBlockConsumerTest.testBrokerSubscriptionRecovery - #17418

Closed
poorbarcode wants to merge 2 commits into
apache:masterfrom
poorbarcode:flaky/testBrokerSubscriptionRecovery
Closed

poorbarcode wants to merge 2 commits into
apache:masterfrom
poorbarcode:flaky/testBrokerSubscriptionRecovery

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Sep 2, 2022 •

Copy link
Copy Markdown
Contributor

Fix:

Motivation

test example: https://github.com/apache/pulsar/runs/8128077384?check_suite_focus=true

Why flaky

This test, uses the index to compare the messages, but the order of received messages is not guaranteed:

  • Subscription type is Shared
  • Enabled streaming dispatch (There may be bugs in this scenario. I am confirming it)

截屏2022-09-02 12 15 36

Modifications

  • This PR is only concerned with fixing flaky Test
    • Compare using the content of the unack messages
  • There may be bugs when enabled streaming dispatch.
    • There should be another PR solution

Documentation

  • doc-required

  • doc-not-needed

  • doc

  • doc-complete

@poorbarcode

Copy link
Copy Markdown
Contributor Author

@poorbarcode poorbarcode closed this Sep 2, 2022
@poorbarcode

poorbarcode commented Sep 2, 2022 •

Copy link
Copy Markdown
Contributor Author

Try to expand the wait time to receive messages

@poorbarcode poorbarcode reopened this Sep 2, 2022
@poorbarcode

Copy link
Copy Markdown
Contributor Author

@mattisonchao will fix the problem of streaming dispatch

@poorbarcode poorbarcode closed this Sep 2, 2022
@poorbarcode poorbarcode changed the title [fix][flaky-test]DispatcherBlockConsumerTest.testBrokerSubscriptionRecovery [fix][flaky-test] PersistentStreamingDispatcherBlockConsumerTest.testBrokerSubscriptionRecovery Sep 2, 2022
@tisonkun

tisonkun commented Sep 3, 2022 •

Copy link
Copy Markdown
Member

Try to expand the wait time to receive messages

Since we have a great number of tests, this approach can hardly work. Because if every test tries to wait for a long time, the resource is consumed more eagerly and more tests become unstable due to they don't get enough time to run.

... and we have a global timeout for each GitHub Actions workflow run, so we just cannot wait forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants