-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[pkg/stanza] Flaky test TestDeleteAfterRead_SkipPartials #27845
Labels
Comments
dmitryax
added
bug
Something isn't working
priority:p2
Medium
flaky test
a test is flaky
pkg/stanza
labels
Oct 18, 2023
Pinging code owners for pkg/stanza: @djaglowski. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Another hit on the same test
|
djaglowski
added a commit
that referenced
this issue
Dec 1, 2023
Fixes #27845 The failure mechanism was very subtle. The test waits for the contents of the short file to be emitted before canceling the context which is used in the file reader. However, the reader may require one additional scan to determine that it's reached the end of the file, and therefore in a tiny proportion of cases, the context cancelation could actually trigger the reader to return before it had determined it should delete the file. The solution involves validating file deletion before canceling the context. I was able to reproduce failure locally only about 1/3000 times, but with this change was able to run 30,000 times without a failure. The PR also cleans up a few related parts of the code.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/6562693797/job/17826173436?pr=27825
The text was updated successfully, but these errors were encountered: