-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testing: fix TestLatestSigsFromThisNode #2940
testing: fix TestLatestSigsFromThisNode #2940
Conversation
Timing issues between writing to and reading from the database cause the test to occasionally fail. Make the test more tolerant to such timing issues by polling.
Codecov Report
@@ Coverage Diff @@
## master #2940 +/- ##
==========================================
- Coverage 47.33% 47.28% -0.05%
==========================================
Files 355 355
Lines 57224 57224
==========================================
- Hits 27085 27060 -25
- Misses 27079 27102 +23
- Partials 3060 3062 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small request, but looks good otherwise.
if len(latestSigs) == len(keys) { | ||
break | ||
} | ||
time.Sleep(256 * time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather seeing this as an exponential backoff, but it's functionally correct as is.
Summary
Timing issues between writing to and reading from the database cause the test to occasionally fail.
Make the test more tolerant to such timing issues by polling.
Test Plan
This is a fix for a test.