-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Fix flaky testReplicatorsInflightTaskListIsEmptyAfterReplicationFinished #24590
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][broker] Fix flaky testReplicatorsInflightTaskListIsEmptyAfterReplicationFinished #24590
Conversation
…erReplicationFinished
…erReplicationFinished
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
Show resolved
Hide resolved
…erReplicationFinished
BewareMyPower
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one point that is not explained by the comments.
If the test in #24583 (comment) is added based on commit 671994f (the latest commit before #24189), the test will pass.
But if the test is added to master branch, it will always fail.
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
Outdated
Show resolved
Hide resolved
…neWayReplicatorTest.java Co-authored-by: Yunze Xu <xyzinfernity@163.com>
|
I got the reason now. After cluster A created a topic, the creation of the replicator producer will trigger the topic creation of cluster B. i.e. the following code has a great chance to fail: final String topic = "persistent://" + replicatedNamespace + "/topic";
admin1.topics().createNonPartitionedTopic(topic);
Thread.sleep(1000);
admin2.topics().createNonPartitionedTopic(topic);#24189 somehow speeds up the creation of the replication producer. BTW, I found the issue also from my improvements in topic loading. It should be the same reason. Regarding the following test: Question 1: why removing
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24590 +/- ##
============================================
+ Coverage 73.57% 74.29% +0.72%
- Complexity 32624 33027 +403
============================================
Files 1877 1880 +3
Lines 139502 146419 +6917
Branches 15299 16785 +1486
============================================
+ Hits 102638 108783 +6145
- Misses 28908 28995 +87
- Partials 7956 8641 +685
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com>
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com>
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 3ea8c26) (cherry picked from commit ff86be1)
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 3ea8c26) (cherry picked from commit ff86be1)
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 3ea8c26) (cherry picked from commit b8670b5)
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com> (cherry picked from commit 3ea8c26) (cherry picked from commit b8670b5)
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com>
…plicationFinished (apache#24590) Co-authored-by: Yunze Xu <xyzinfernity@163.com>
Fixes #24583
Motivation & Modifications
fix the flaky test
testReplicatorsInflightTaskListIsEmptyAfterReplicationFinishedDocumentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: x