-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][test] flaky AdminApi2Test.cleanup #17861
[fix][test] flaky AdminApi2Test.cleanup #17861
Conversation
LGTM. |
b9c8317
to
814ba41
Compare
Could you take a look? Thanks |
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.
Cool!
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.
Good work!
cc4351d
to
a5c5dd8
Compare
rebase master |
@poorbarcode you may change the title to |
Hi @tisonkun Got it! Thanks |
Can this PR merge? (^_^) |
@Override | ||
protected MetadataStoreExtended createConfigurationMetadataStore() throws MetadataStoreException { | ||
// use MockZooKeeperSession to provide a unique session id for each instance | ||
return new ZKMetadataStore(MockZooKeeperSession.newInstance(mockZooKeeperGlobal), MetadataStoreConfig.builder() |
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.
it shouldn't be better to make this the default behavior in MockedPulsarServiceBaseTest
?
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.
Good idea, already changed
3869e7a
to
f5c5ced
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #17861 +/- ##
=============================================
+ Coverage 34.91% 46.85% +11.93%
- Complexity 5707 17912 +12205
=============================================
Files 607 1573 +966
Lines 53396 128213 +74817
Branches 5712 14100 +8388
=============================================
+ Hits 18644 60072 +41428
- Misses 32119 61953 +29834
- Partials 2633 6188 +3555
Flags with carried forward coverage won't be shown. Click here to find out more. |
/pulsarbot rerun-failure-checks |
1 similar comment
/pulsarbot rerun-failure-checks |
5697306
to
4479b1a
Compare
/pulsarbot rerun-failure-checks |
(cherry picked from commit e365afe)
Fixes: #16980
Fixes: #17530
Motivation
When runs
AdminApi2Test.testTopicPoliciesWithMultiBroker
orBrokerServiceLookupTest.testModularLoadManagerSplitBundle
, you can see some logs like this:Location problem
These test uses
setup()
andPulsarService pulsar_new = startBroker(conf_new)
to create two brokers, but the both brokers use the samezkc
, so both brokers will share thesession
ofZK
, which will lead to the possibility that the two brokers will constantly elect for the leader. see code:pulsar/pulsar-metadata/src/main/java/org/apache/pulsar/metadata/coordination/impl/LeaderElectionImpl.java
Lines 143 to 147 in b89c145
Impact
BrokerServiceLookupTest
AdminApi2Test.cleanup
Modifications
session
Documentation
doc-not-needed
Matching PR in forked repository
PR in forked repository: