Fix some flakiness with the manager tests#2575
Merged
Merged
Conversation
…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 Report
@@ 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 |
anshulpundir
approved these changes
Mar 30, 2018
nishanttotla
approved these changes
Apr 3, 2018
This was referenced May 2, 2018
Merged
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.
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.torequire.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)