chore(Test): Inhibit RunSynchronouslyImmediate; reduce suite concurrency re #20306 - #20308
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR mitigates CI timeouts/flakiness around new async tests by (a) temporarily routing most Async.RunSynchronouslyImmediate usage back to Async.RunSynchronously, and (b) reducing test-suite concurrency by placing additional async test modules into FSharp.Test.NotThreadSafeResourceCollection (tracked to #20306).
Changes:
- Introduces local helper shims (
asyncWait*) and rewrites many test call sites to avoidAsync.RunSynchronouslyImmediate. - Adds/extends xUnit collection annotations to inhibit parallel execution for additional async test modules.
- Cleans up the
AsyncModuleFunctionstest module declaration while applying the same concurrency mitigation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncType.fs | Adds helper shims and switches many tests off RunSynchronouslyImmediate; expands NotThreadSafe collection usage for related async test modules. |
| tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncModuleFunctions.fs | Applies NotThreadSafe collection to the module and temporarily switches helper execution to Async.RunSynchronously. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
708b911 to
8171878
Compare
|
First run had two CI jobs still taking > 1h @T-Gro @majocha (edit: also disabled now, see #20308 (comment)) Happy for this to be merged to park having to consider RunSynchronously and/or the increased test collection concurrency as suspects re build stability, and then circle back to reinstating them later Note also, as it stands the best guess in the OP (xunit synccontext stuff vs RSI synccontext stuff) remains unproven; the key diff in here is the extension of the 5s failsafe timeout to 30s #20306 (comment) |
|
If deadlocks in CI persist, I'd change all the calls inside the compiler to |
|
@majocha you know the general run time better than me - as it stands this run is 1h; I guess that qualifies? NOTE there are some stragglers in |
8171878 to
5ca5f7a
Compare
5ca5f7a to
55e0fb4
Compare
This comment has been minimized.
This comment has been minimized.
75c3289 to
6c74c80
Compare
6c74c80 to
9fc39e7
Compare
|
🔍 Tooling Safety Check — Affects-Test-Tooling
|
|
I'm thinking the next step might be to flip the RunSynchronouslyImmediate back on and see whether that changes the build outcome? Done:
|
|
Ok lets give it a try and observe what CI does. |

Inhibits additional concurrency, and temporarily redirects all usages of the (new)
Async.RunSynchronouslyImmediateto theRunSynchronously, see #20306Triage and analysis can/will be done by reinstating the calls to
RunSynchronouslyImmediatein the shims and/or releasing the suites that have added to the Xunit.Collection on a as-yet-unsubstantiated-basis to run concurrently (all tagged #20306 in comments)@majocha @T-Gro