You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Motivation
Fixes#1614#1617
The flaky test was actually because of a race condition in the dispatcher code. If there is a pending read when the consumer is switched, the actual switch happens after the read completes, but the dispatcher wouldn't trigger the notification at that point.
### Modifications
Ensure the active/inactive notification is sent after the read completes.
Expected behavior
The test is timing out several times. eg:
https://builds.apache.org/job/pulsar_precommit_java8/724/testReport/junit/org.apache.pulsar.broker.service/PersistentFailoverE2ETest/testSimpleConsumerEventsWithoutPartition/
Test thread is blocked on:
https://github.com/apache/incubator-pulsar/blob/8fbb926089effcadf59e199fe69ec65b4bbe4eae/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentFailoverE2ETest.java#L217
In particular it's waiting on the
listener.activeQueue.take().intValue())
https://github.com/apache/incubator-pulsar/blob/8fbb926089effcadf59e199fe69ec65b4bbe4eae/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PersistentFailoverE2ETest.java#L102-L105
The text was updated successfully, but these errors were encountered: