Skip to content

Fix some flakiness with the manager tests#2575

Merged
nishanttotla merged 1 commit into
moby:masterfrom
cyli:fix-manager-tests
Apr 3, 2018
Merged

Fix some flakiness with the manager tests#2575
nishanttotla merged 1 commit into
moby:masterfrom
cyli:fix-manager-tests

Conversation

@cyli
Copy link
Copy Markdown
Contributor

@cyli cyli commented Mar 28, 2018

I've noticed these two tests failing occasionally in CI:

In the TestManager, it may take a little while for the dispatcher to come up, so poll until it's up.

In TestManagerLockUnlock, we wait for the TLS key bytes to change to test to see whether it has been decrypted after disabling the unlock key. However, it could have changed due to a renewal due to the previous unlock key rotation. So when polling, check that it's decrypted.

Also, I just changed all instances of assert. to require. so that the test fails immediately instead of continuing on and erroring. Just my personal preference - if anyone particularly objects, I'll be happy to change it back after a discussion.

I was able to replicate the flakiness within 2-5 iterations of running these tests in CI (if I used the SSH functionality of circle). With the fix (plus a patch for #2577) I've gotten up to 215+ iterations without triggering the failures (not that it failed after, but my SSH connection died)

…ager), it may take

a little while for the dispatcher to come up, so poll until it's up.

In the second case (TestManagerLockUnlock), we wait for the TLS key bytes to change to
test to see whether it has been decrypted after disabling the unlock key.  However, it
could have changed due to a renewal due to the previous unlock key rotation.  So when
polling, check that it's decrypted.

Signed-off-by: Ying Li <ying.li@docker.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2018

Codecov Report

Merging #2575 into master will increase coverage by 0.41%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2575      +/-   ##
==========================================
+ Coverage   61.42%   61.83%   +0.41%     
==========================================
  Files         134      134              
  Lines       21722    21722              
==========================================
+ Hits        13342    13432      +90     
+ Misses       6945     6843     -102     
- Partials     1435     1447      +12

@cyli cyli changed the title WIP: Fix some flakiness with the manager tests Fix some flakiness with the manager tests Mar 28, 2018
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.

3 participants