Skip to content

Comments

xUnit: remove defunct helpers, add deterministic init via assembly fixture#19344

Draft
majocha wants to merge 4 commits intodotnet:mainfrom
majocha:xunit2-cleanup
Draft

xUnit: remove defunct helpers, add deterministic init via assembly fixture#19344
majocha wants to merge 4 commits intodotnet:mainfrom
majocha:xunit2-cleanup

Conversation

@majocha
Copy link
Contributor

@majocha majocha commented Feb 21, 2026

some functionality we had with v2 can be restored in the future:

@github-actions
Copy link
Contributor

✅ No release notes required

@majocha majocha closed this Feb 22, 2026
@majocha majocha reopened this Feb 22, 2026
@majocha majocha marked this pull request as ready for review February 23, 2026 14:46
@majocha majocha requested a review from a team as a code owner February 23, 2026 14:46
@majocha
Copy link
Contributor Author

majocha commented Feb 24, 2026

There is a deadlock in ComponentTests that can happen with xUnit v3 running tests in parallel:
image

Locally I can see it with some tests calling Task.Wait and Task.Result directly.

Synchronous Task.Wait and Task.Result in these tests sometimes deadlocked during xUnit v3 parallel test runs, probably due to interaction with xUnit synchronization context.
@majocha
Copy link
Contributor Author

majocha commented Feb 24, 2026

The deadlock was because of synchronous Task.Wait and Task.Result in some tests. These don't play well with xUnit v3 parallel test runs, probably due to interaction with xUnit synchronization context.
I added a fix for the deadlock by wrapping the tests in question in task CE and awaiting the tasks instead of calling Task.Result.

ETA:
It seems something gets stuck on MacOS still.

@majocha majocha marked this pull request as draft February 24, 2026 10:59
@majocha
Copy link
Contributor Author

majocha commented Feb 24, 2026

ComponentTests run very slow on MacOS CI leg. 50+ minutes vs 9 minutes on Linux.

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

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant