ZOOKEEPER-2623: [ADDENDUM] Fix flaky CheckTest::testCluster #2067
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.
All tests are refactored to fail before #1988 and resist more than 100 runs locally without failure after #1988.
Context
I saw several failed ci actions due to flaky
CheckTest::testCluster
after #1988 merged:In investigation, I constructed a commit kezhuw@e452ff9 in branch in my fork basing on code before #1988. The commit is extracted from above flaky test. It still could not resist about 20 runs. So I think we are safe to go with this pr.
TLDR: The log reveals potential double leading
I am still investigating, so I can be completely wrong! I was thinking it is related to Oracle Quorum, but the test still fail after changing
withOracle
tofalse
insetUp
.server3
is the old leader.In election after `server3` started, both `server1` and `server2` proposed `server2` as new leader.
Then both `server2` and `server3` claims they are leaders and "Have quorum of supporters".