[tests] Fix flakey TestNodeRejoins test#2251
Merged
aaronlehmann merged 1 commit intomoby:masterfrom Jun 14, 2017
Merged
Conversation
…f the certificates on disk have been changed. This should be the case for agent, but not necessarily the case for manager, so remove that assumption from the test. Signed-off-by: Ying Li <ying.li@docker.com>
Codecov Report
@@ Coverage Diff @@
## master #2251 +/- ##
==========================================
- Coverage 66.52% 60.39% -6.14%
==========================================
Files 92 124 +32
Lines 13480 20248 +6768
==========================================
+ Hits 8968 12229 +3261
- Misses 3561 6650 +3089
- Partials 951 1369 +418 |
Collaborator
|
LGTM |
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.
TestNodeRejoinstests that both a manager and agent will fail early if the certificates on disk have been changed in the case where they've already joined a cluster previously. After discussion with @aaronlehmann, this should be the case for agent, but not necessarily the case for manager, so remove that assumption from the test.Previously this was often passing because on startup, the agent of the manager may try to connect to another manager first and the agent dies. If the manager itself starts up first, and the local agent connects to that manager, then the manager just keeps trying to reconnect to the rest of the raft cluster over and over and failing. If the local agent connects to this local manager first instead, then the flakeyness was triggered because the node is never ready because the agent never fails to connect with a x509 error.
I plan on adding a test for joining a cluster for the first time (so no raft state) with invalid bootstrapped certs in a separate PR.