-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Flaky test: TestAddCertsToWatch_remove_ca
#2586
Comments
There are a few file descriptor leaks in the unit tests, and on an error condition in certwatcher. This is an issue when checking for flaky tests with `go test -test.count ..`. One leak is in an error condition in certwatcher but it is unlikely to be a runtime issue because. Related jaegertracing#2586 Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
There are a few file descriptor leaks in the unit tests, and on an error condition in certwatcher. This is an issue when checking for flaky tests with `go test -test.count ..`. One leak is in an error condition in certwatcher but it is unlikely to be a runtime issue because. Related #2586 Signed-off-by: Carl Henrik Lunde <chlunde@ifi.uio.no>
@albertteoh the fix might have introduced a different issue (possible with the order of asserts), the test again failed on master: https://travis-ci.com/github/jaegertracing/jaeger/jobs/428075939#L2104 |
@yurishkuro the fix for this issue is for the |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
https://travis-ci.com/github/albertteoh/jaeger/jobs/406895163
Expected behavior
Passing test.
What troubleshooting steps did you try?
Adding the following at the end of the test:
Prints:
I believe the root cause is a race where the following
waitUntil
finishes after the first detected "Certificate has been removed..." log, and before the secondclientCAFile
deletion is detected by thecertWatcher
:Causing the second assertion to fail:
Proposed Fix
Modify the log observer check to wait until at least 2 cert deletions are seen (>= 2 for readability):
Confirmed that this change doesn't just pass tests due to timeout and hence, does not negatively impact test execution time:
>= 2
:>=3
still passes but requires a 10s wait to timeout thewaitUntil
:The text was updated successfully, but these errors were encountered: