Commit 6c1afb8
authored
fix: flaky TestCancelOverridesPendingWants (#1016)
added 10ms delay before AddCancels to fix race condition.
after collectMessages returns, the queue's goroutine might still be
marking items as "sent". without this delay, AddCancels might not see
the CIDs as sent and won't create cancel messages, causing test timeout.
fixes CI failures with -race flag.1 parent 30868de commit 6c1afb8
1 file changed
+14
-2
lines changedLines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
364 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
365 | 377 | | |
366 | 378 | | |
367 | | - | |
| 379 | + | |
368 | 380 | | |
369 | 381 | | |
370 | 382 | | |
| |||
0 commit comments