You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky test: WaitsFor_Performance_Many_Quick_Polls times out on starved Windows CI runner #7325
WaitsFor_Performance_Many_Quick_Polls (tests/TUnit.Assertions.Tests/WaitsForAssertionTests.cs:249) failed on modularpipeline (windows-latest) for PR #7281 (a Renovate dependency bump that doesn't touch assertions code):
AssertionException: Expected assertion to pass within 5000 milliseconds (polling every 10ms)
but assertion did not pass within 5000ms after 18 attempts. Last error: Expected to be greater than 20
That failure aborted the pipeline, so PackTUnitFilesModule and the other modules show as cancelled (Attempting to cancel the build...). They were not real failures.
Cause
The test requires 21 polls at a 10 ms interval inside a 5 s timeout, and then requires the elapsed time to be under 5 s. Only 18 polls completed in 5 s, roughly 280 ms per poll, so the thread pool and timers on the runner were starved while the pipeline ran many test modules in parallel. The test measures wall-clock throughput on a shared CI machine rather than the behaviour of WaitsFor.
Expected
The test should check that WaitsFor keeps polling until the predicate passes, and it should not depend on runner speed. For example:
use a generous timeout (e.g. 30 s) so the poll count is the only real condition, and
drop or loosen the stopwatch.Elapsed < 5s assertion, which only measures CI load.
Run TUnit.Assertions.Tests with --treenode-filter "/*/*/WaitsForAssertionTests/WaitsFor_Performance_Many_Quick_Polls" on a CPU-starved machine, e.g. with a parallel CPU stress load.
Another occurrence on PR #7357 (Windows matrix, run 41361347135): 19 attempts in 5000 ms, last value 20. Each poll took about 260 ms against a 10 ms interval while the other test modules were starting. The rest of the run passed, and the failed job has been re-run.
Activity
thomhurst commentedon Nov 1, 2026
Another occurrence on PR #7357 (Windows matrix, run 41361347135): 19 attempts in 5000 ms, last value 20. Each poll took about 260 ms against a 10 ms interval while the other test modules were starting. The rest of the run passed, and the failed job has been re-run.
Fix #7325: test repeated polling without a throughput deadline
Fix #7325 CI: refresh snapshots for null predicate matching