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 testConsumerEventWithoutPartition cause by the change of Pulsar 3.0 #281

Conversation

BewareMyPower
Copy link
Contributor

Fixes #280

Motivation

apache/pulsar#19502 brings a change to the consumer selection of the Failover subscription.

Before that PR, if a new consumer joins a Failover subscription when there is a consumer that subscribes the topic, the new consumer will receive the "inactive" event.

After that PR, a random consumer will receive the "inactive" event.

Modifications

Change the assertion when consumer subscribes the topic with the same subscription.

In addition, use a thread safe queue to avoid race conditions.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

…lsar 3.0

### Motivation

apache/pulsar#19502 brings a change to the
consumer selection of the Failover subscription.

Before that PR, if a new consumer joins a Failover subscription when
there is a consumer that subscribes the topic, the new consumer will
receive the "inactive" event.

After that PR, a random consumer will receive the "inactive" event.

### Modifications

Change the assertion when `consumer` subscribes the topic with the same
subscription.

In addition, use a thread safe queue to avoid race conditions.
@BewareMyPower BewareMyPower merged commit a42261b into apache:main Jun 6, 2023
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-flaky-failover-distro branch June 6, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky Test: ConsumerTest.testConsumerEventWithoutPartition
2 participants