Skip to content

[fix] [test] fix flaky test PersistentFailoverE2ETest.testSimpleConsumerEventsWithPartition#19574

Merged
Technoboy- merged 3 commits into
apache:masterfrom
poorbarcode:flaky/testSimpleConsumerEventsWithPartition
Feb 21, 2023
Merged

[fix] [test] fix flaky test PersistentFailoverE2ETest.testSimpleConsumerEventsWithPartition#19574
Technoboy- merged 3 commits into
apache:masterfrom
poorbarcode:flaky/testSimpleConsumerEventsWithPartition

Conversation

@poorbarcode
Copy link
Copy Markdown
Contributor

@poorbarcode poorbarcode commented Feb 20, 2023

Motivation

  1. The single consumer dispatcher selects consumer according to the name order of consumers. The test testSimpleConsumerEventsWithPartition is also written according to this rule. After PR [improve][broker] introduce consistent hash ring to distribute the load of multiple topics subscription #19502, the dispatcher no longer selects consumers in the order of registration, so the test becomes unstable.

  2. And the same thing is true for PersistentDispatcherFailoverConsumerTest.testAddRemoveConsumerNonPartitionedTopic

  3. In the original implementation, non-partitioned topic did not care about the priority of consumers, but after PR [improve][broker] introduce consistent hash ring to distribute the load of multiple topics subscription #19502, it began to care about the priority of consumers, which also led to the instability of PersistentDispatcherFailoverConsumerTest.testAddRemoveConsumerNonPartitionedTopic test

Modifications

  • fix flaky test PersistentFailoverE2ETest.testSimpleConsumerEventsWithPartition
  • fix flaky test PersistentDispatcherFailoverConsumerTest.testAddRemoveConsumerNonPartitionedTopic

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Feb 20, 2023
@Technoboy- Technoboy- added this to the 3.0.0 milestone Feb 21, 2023
@Technoboy- Technoboy- closed this Feb 21, 2023
@Technoboy- Technoboy- reopened this Feb 21, 2023
@poorbarcode
Copy link
Copy Markdown
Contributor Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #19574 (38d02d1) into master (e0b50c9) will increase coverage by 37.47%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #19574       +/-   ##
=============================================
+ Coverage     24.65%   62.13%   +37.47%     
- Complexity      291    25726    +25435     
=============================================
  Files          1591     1844      +253     
  Lines        123073   135280    +12207     
  Branches      13434    14875     +1441     
=============================================
+ Hits          30348    84060    +53712     
+ Misses        88233    43494    -44739     
- Partials       4492     7726     +3234     
Flag Coverage Δ
inttests 24.55% <ø> (-0.11%) ⬇️
systests 25.24% <ø> (?)
unittests 59.33% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ce/ConsistentHashingStickyKeyConsumerSelector.java 76.92% <0.00%> (-3.85%) ⬇️
...service/nonpersistent/NonPersistentReplicator.java 58.41% <0.00%> (-1.99%) ⬇️
...in/java/org/apache/pulsar/common/api/AuthData.java 71.42% <0.00%> (ø)
.../apache/pulsar/broker/namespace/LookupOptions.java 87.50% <0.00%> (ø)
...apache/pulsar/common/util/SafeCollectionUtils.java 0.00% <0.00%> (ø)
...pache/pulsar/common/configuration/BindAddress.java 22.22% <0.00%> (ø)
...lsar/client/impl/conf/ReaderConfigurationData.java 81.39% <0.00%> (ø)
...r/client/admin/internal/data/AuthPoliciesImpl.java 65.21% <0.00%> (ø)
...sar/common/policies/data/impl/BundlesDataImpl.java 92.30% <0.00%> (ø)
...ar/common/policies/data/InactiveTopicPolicies.java 83.33% <0.00%> (ø)
... and 1369 more

@Technoboy- Technoboy- merged commit 02b25a3 into apache:master Feb 21, 2023
@poorbarcode poorbarcode deleted the flaky/testSimpleConsumerEventsWithPartition branch February 21, 2023 09:14
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 ready-to-test type/flaky-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants