Commit 46185f2
committed
Fix flaky test TestSubscribeWithContextDone
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: #1861 parent c6d5381 commit 46185f2
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
409 | | - | |
| 410 | + | |
| 411 | + | |
410 | 412 | | |
411 | 413 | | |
412 | 414 | | |
413 | | - | |
414 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
415 | 420 | | |
416 | 421 | | |
417 | | - | |
| 422 | + | |
418 | 423 | | |
419 | 424 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
| 425 | + | |
| 426 | + | |
424 | 427 | | |
0 commit comments