Skip to content

Require threads for ControlledExecutionTests.CancelInTryAndExitCatchNormally - #136116

Merged
lewing merged 1 commit into
dotnet:mainfrom
pcshrosbree:tests/controlledexecution-exitcatch-threads
Oct 20, 2026
Merged

lewing merged 1 commit into
dotnet:mainfrom
pcshrosbree:tests/controlledexecution-exitcatch-threads

Conversation

@pcshrosbree

Copy link
Copy Markdown
Contributor

TL;DR: Since #135939 merged, System.Runtime.Tests times out in browser-wasm CI. The likely cause is a test that needs threads but now runs on single-threaded wasm, where it cannot finish. This one-line change skips that test, ControlledExecutionTests.CancelInTryAndExitCatchNormally, when threads are unavailable, as the other Task.Run tests in its class do. This PR's own browser CI run will show whether that resolves the timeout.

The test cancels its action from a Task.Run task while the action spins. #135915 and #135939 merged a minute apart, and each changed this class:

On single-threaded wasm, the canceling task cannot run while the action spins. In the browser-wasm LibraryTestsCoreCLR leg, System.Runtime.Tests had these results:

Under src/libraries, #135939 changed only this test's attribute. The log does not name the test that was running.

Both PRs are mine, and I missed the interaction before they merged.

Note

This PR was prepared with AI assistance (Anthropic Claude, checked by OpenAI Codex) at my request. I reviewed it before posting it.

CancelInTryAndExitCatchNormally cancels its action from a Task.Run task
while the action spins. dotnet#135915 moved the IsMultithreadingSupported
condition from the ControlledExecutionTests class onto the four enabled
tests that do this. dotnet#135939 enabled this test again from a branch that
predated dotnet#135915, so the test has no such condition. On single-threaded
wasm the task cannot run while the action spins, which is the likely
cause of the System.Runtime.Tests timeouts in the browser-wasm library
tests. Add the condition, as the other Task.Run tests have.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Oct 20, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

@lewing

lewing commented Oct 20, 2026

Copy link
Copy Markdown
Member

/ba-g fast merging test fix

@lewing
lewing merged commit f9725f1 into dotnet:main Oct 20, 2026
84 of 95 checks passed
@pcshrosbree

Copy link
Copy Markdown
Contributor Author

Thank you for the review and the merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Numerics community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants