Skip to content
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

Enable udp server tests #12919

Merged
merged 6 commits into from
Aug 4, 2022

Conversation

jspaleta
Copy link
Contributor

@jspaleta jspaleta commented Aug 3, 2022

Description:
Add additional race condition protections for client/server goroutine interactions in the statsd and carbon receiver ListenAndServer test.

new logic introduces a timeout/tick loop to test for message reception prior to closing the listening server side connection. The new logic addresses the race when the server connection is closed prior to the recv buffer being read in the goroutine reading from the connection buffer, but giving the test enough time to let the server goroutine read from the connection buffer before the main test process request connection close.

The encoded timeout is generous at 10 seconds, but the tick loop fires every 500 msecs so I expect in production wait loop will break out successfully in a couple of ticks, unless I've misinterpreted the underlying problem.

This is a 2nd effort to fix bug: #10916

Testing:
The production race condition is hard to hit in local testing (races are fun!), but I was able to observe the race locally and was able to re-create it synthetically by introducing long waits in the server goroutine.

Documentation:
No documentation

@djaglowski djaglowski added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Aug 3, 2022
@djaglowski djaglowski merged commit dcc2efd into open-telemetry:main Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants