-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
test: fix TestNewReceiver race conditions #42084
Conversation
update zapcore to use observer zaptest package to avoid race condition on zapLogs bytes.Buffer use atomic for countLogs to avoid race condition on primitive type
This pull request doesn't have a |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
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.
Thank You.
If you have the time can you add the same changes to:
https://github.com/elastic/beats/blob/main/x-pack/filebeat/fbreceiver/receiver_test.go
or I can after this is merged.
Thank you! 🙇 I plan to fix all the race conditions spotted by the race detector so it should be a matter of time |
update zapcore to use observer zaptest package to avoid race condition on zapLogs bytes.Buffer use atomic for countLogs to avoid race condition on primitive type (cherry picked from commit d115014)
update zapcore to use observer zaptest package to avoid race condition on zapLogs bytes.Buffer use atomic for countLogs to avoid race condition on primitive type (cherry picked from commit d115014) Co-authored-by: kruskall <99559985+kruskall@users.noreply.github.com>
Proposed commit message
update zapcore to use observer zaptest package to avoid race condition on zapLogs bytes.Buffer
use atomic for countLogs to avoid race condition on primitive type
bytes.Buffer
race condition:countLogs race condition:
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs