Skip to content

Fix flaky testConsumerEventWithoutPartition cause by the change of Pulsar 3.0#281

Merged
BewareMyPower merged 1 commit into
apache:mainfrom
BewareMyPower:bewaremypower/fix-flaky-failover-distro
Jun 6, 2023
Merged

Fix flaky testConsumerEventWithoutPartition cause by the change of Pulsar 3.0#281
BewareMyPower merged 1 commit into
apache:mainfrom
BewareMyPower:bewaremypower/fix-flaky-failover-distro

Conversation

@BewareMyPower
Copy link
Copy Markdown
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