-
Notifications
You must be signed in to change notification settings - Fork 183
Flaky test: TestSubscribeWithContextDone #186
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
Comments
n-peugnet
added a commit
to n-peugnet/sse
that referenced
this issue
Feb 20, 2025
Instead of comparing the number of goroutines which is inherently unreliable, we count the number of goroutines that exited using a defer statement, and an atomic counter. By the way, the timer are reduced to 10ms as it is more than enough time to let the goroutines exit. Closes: r3labs#186
n-peugnet
added a commit
to n-peugnet/sse
that referenced
this issue
Feb 20, 2025
Instead of comparing the number of goroutines which is inherently unreliable, we count the number of goroutines that exited using a defer statement, and an atomic counter. By the way, the timer are reduced to 100ms as it is more than enough time to let the goroutines exit. Closes: r3labs#186
n-peugnet
added a commit
to n-peugnet/sse
that referenced
this issue
Feb 22, 2025
Instead of comparing the number of goroutines which is inherently unreliable, we count the number of goroutines that exited using a defer statement, and an atomic counter. By the way, the timer are reduced to 10ms as it is more than enough time to let the goroutines exit. Closes: r3labs#186
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While packaging this library in Debian, we noticed that the test
TestSubscribeWithContextDone
is flaky. It can fail, for example when the machine has a high load while running the tests:One way to reproduce this failure reliably is to pin the execution on a few CPUs, for example with taskset (thanks Santiago Vila for the reproducer):
See also: https://bugs.debian.org/1098392
The text was updated successfully, but these errors were encountered: