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

Fix goroutine leak in server test. #519

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Dec 2, 2021

In TestResponseHandler, the test runs the server in a goroutine,
but doesn't guarantee that the goroutine completes before the end of
the test. In addition to simply leaking the goroutine, this can panic
if there is an error after the test completes. In that case, it is
unnecessarily hard to debug.

Signed-off-by: James Peach jpeach@apache.org

In `TestResponseHandler`, the test runs the server in a goroutine,
but doesn't guarantee that the goroutine completes before the end of
the test. In addition to simply leaking the goroutine, this can panic
if there is an error after the test completes. In that case, it is
unnecessarily hard to debug.

Signed-off-by: James Peach <jpeach@apache.org>
@alecholmez alecholmez merged commit d39f960 into envoyproxy:main Dec 2, 2021
@jpeach jpeach deleted the test-goroutine-leaks branch December 2, 2021 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants