Commit ce2a17a
Fix flaky CancellationPropagatesToTask test (#19569)
Add synchronization to ensure the async computation has actually started
running on the thread pool before cancelling the default token. Without
this, under heavy CI load the thread pool may not schedule the async
within the 1-second wait window, causing the task to never transition
to Canceled state before the timeout.
This mirrors the pattern already used by the CancellationPropagatesToGroup
test which uses a ManualResetEvent for the same purpose.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 872352f commit ce2a17a
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
258 | 259 | | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| 264 | + | |
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
| |||
0 commit comments