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

testing: make sure all goroutines are stopped as tests are ending #23

Open
bobheadxi opened this issue Mar 15, 2019 · 0 comments
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bobheadxi
Copy link
Contributor

uber-go/zap#687 (comment)

t.Log is safe for concurrent use, but it's not safe to call t.Log as the test is ending, which I think is causing the race detector to go off. You should make sure that any background goroutines are stopped before the test ends.

This should fix the occasional race condition warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants