Commit 6a9fa4e
committed
test: fix flaky AvaloniaScheduler zero-delay test
Replace the fixed Thread.Sleep(50) + bool flag with a TaskCompletionSource
awaited via WaitAsync(10s). When the scheduler runs off the dispatcher's UI
thread it posts the action at Background priority; on loaded macOS CI runners
50ms was occasionally too short before the assertion, causing intermittent
failures. The action now completes instantly on the synchronous path and gets
ample time (failing loudly via timeout) on the posted path.1 parent 89c3cfd commit 6a9fa4e
1 file changed
Lines changed: 7 additions & 5 deletions
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments