Repository navigation
[fix][flaky-test] BookKeeperClusterTestCase.setup() - #17865
Merged
congbobo184 merged 3 commits intoSep 29, 2022
Merged
congbobo184 merged 3 commits into
congbobo184 merged 3 commits into
Conversation
congbobo184
requested review from
codelipenghui,
gaoran10 and
liangyepianzhou
September 28, 2022 02:58
Contributor
poorbarcode
reviewed
Sep 28, 2022
| } | ||
|
|
||
| @AfterMethod | ||
| @AfterMethod(alwaysRun = true) |
Contributor
There was a problem hiding this comment.
Should we need do same for managed-ledger/src/test/java/org/apache/bookkeeper/test/BookKeeperClusterTestCase.java
relate issue:
codelipenghui
approved these changes
Sep 29, 2022
poorbarcode
approved these changes
Sep 29, 2022
eolivelli
reviewed
Sep 29, 2022
| serverFactory.configure(zkaddr, 100); | ||
| serverFactory.startup(zks); | ||
| public void restartCluster() throws Exception { | ||
| this.zks = new ZooKeeperServer(this.zkTmpDir, this.zkTmpDir, 3000); |
Contributor
There was a problem hiding this comment.
as a followup work we should move to the official ZookKeeper Java API to bootstrap the server from Java (ZooKeeperServerEmbedded) or use Curator Testing Server.
Both of them provide official an tested APIs to run ZooKeeper
Contributor
|
/pulsarbot rerun-failure-checks |
This was referenced Sep 29, 2022
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #15773 #16863 #16860
Motivation
The root cause is that the zk client randomly selects IPV4 and IPV6 when parsing localhost, can connect when using IPV4, and fails when using IPV6. Therefore, if you continue to randomly connect to IPV6, the connection will timeout.
https://github.com/apache/zookeeper/blob/bc1b231c9e32667b2978c86a6a64833470973dbd/zookeeper-server/src/main/java/org/apache/zookeeper/client/StaticHostProvider.java#L140-L146
Thanks to @poorbarcode for helping me locate the problem
Modifications
add @AfterMethod(alwaysRun = true)
use Adress replace hostName
Documentation
doc-not-neededMatching PR in the forked repository
PR in forked repository: