Repository navigation
Run multi-TFM tests sequentially to fix XunitMultiTFM/MStestMultiTFM flakiness - #55197
Merged
Merged
Conversation
…flakiness These two tests run `dotnet test` on a net48;net11.0 project through the legacy VSTest console logger and assert on contiguous substrings like 'Passed TestNamespace...VSTestXunitPassTestDesktop'. DispatchToInnerBuildsWithVSTestTarget fans the TFMs out with BuildInParallel, so both console loggers write to the same redirected stdout and occasionally interleave mid-line, breaking the substring assertions. Pass --property:TestTfmsInParallel=false so the TFMs run sequentially. Both still run; their output just can't interleave. Fixes #55194. Co-authored-by: Copilot App <[email protected]>
baronfel
approved these changes
Jul 8, 2026
nohwnd
enabled auto-merge (squash)
July 8, 2026 15:29
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses intermittent flakiness in dotnet.Tests multi-targeting dotnet test output assertions by ensuring multi-TFM test execution is sequential, preventing interleaved legacy VSTest console output on redirected stdout (fixes #55194).
Changes:
- Add
--property:TestTfmsInParallel=falseto thedotnet testinvocations used byMStestMultiTFMandXunitMultiTFM. - Document in-code why sequential execution is required (stdout interleaving breaks contiguous substring assertions).
Evangelink
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XunitMultiTFMandMStestMultiTFMrundotnet teston anet48;net11.0project through the legacy VSTest console logger and assert on contiguous substrings likePassed TestNamespace...VSTestXunitPassTestDesktop.DispatchToInnerBuildsWithVSTestTargetfans the TFMs out withBuildInParallel, so both console loggers write to the same redirected stdout and occasionally interleave mid-line —Passedlands on one line,Stack Trace:from the other TFM flushes in between, and the substring assertion fails. Purely timing-dependent, which is why it's rare and won't reproduce on demand.Pass
--property:TestTfmsInParallel=false(the documented knob) so the TFMs run sequentially. Both still run; their output just can't interleave.Fixes #55194.