Skip to content

[tests] Fix flakey TestNodeRejoins test#2251

Merged
aaronlehmann merged 1 commit intomoby:masterfrom
cyli:fix-node-rejoins-test
Jun 14, 2017
Merged

[tests] Fix flakey TestNodeRejoins test#2251
aaronlehmann merged 1 commit intomoby:masterfrom
cyli:fix-node-rejoins-test

Conversation

@cyli
Copy link
Copy Markdown
Contributor

@cyli cyli commented Jun 13, 2017

TestNodeRejoins tests 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.

…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
Copy link
Copy Markdown

codecov Bot commented Jun 13, 2017

Codecov Report

Merging #2251 into master will decrease coverage by 6.13%.
The diff coverage is n/a.

@@            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

@aaronlehmann
Copy link
Copy Markdown
Collaborator

LGTM

@aaronlehmann aaronlehmann merged commit d9a1b9d into moby:master Jun 14, 2017
@cyli cyli deleted the fix-node-rejoins-test branch June 14, 2017 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants