Repository navigation
Parallelize compatibility tool tests - #56030
Merged
Evangelink merged 2 commits intoSep 9, 2026
Merged
Evangelink merged 2 commits into
Evangelink merged 2 commits into
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Lite
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/ValidatePackageInProcessTests.cs — The rationale for marking this test non-parallelizable (pack/restore stderr noise under concurrent… |
What changed in this PR
This PR opts specific Compatibility tool test projects into MSTest assembly parallelization to reduce overall test wall-clock time, while attempting to keep a known stderr-sensitive PackageValidation scenario from running concurrently.
Changes:
- Enable MSTest assembly parallelization in several Compatibility test projects via
MSTestParallelizeScope(mostlyMethodLevel, oneClassLevel). - Mark
ValidateReferencesAreRespectedForPlatformSpecificTFMsas[DoNotParallelize]to avoid concurrency-related stderr noise during pack/restore.
| File | Description |
|---|---|
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj | Opts this test assembly into MSTest parallel execution (ClassLevel). |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj | Opts this test assembly into MSTest parallel execution (MethodLevel). |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.IntegrationTests/Microsoft.DotNet.GenAPI.IntegrationTests.csproj | Opts this test assembly into MSTest parallel execution (MethodLevel). |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.IntegrationTests/Microsoft.DotNet.ApiDiff.IntegrationTests.csproj | Opts this test assembly into MSTest parallel execution (MethodLevel). |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj | Opts this test assembly into MSTest parallel execution (MethodLevel). |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj | Opts this test assembly into MSTest parallel execution (MethodLevel). |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/ValidatePackageInProcessTests.cs | Adds [DoNotParallelize] to one pack/restore test to reduce stderr-related flakiness under concurrency. |
Member
Author
Local before/after benchmarkPartial local gain confirmed on my Windows machine using the SDK repo test runner.
Comparable clean total: 1m 23.1s before -> 36.641s after (46.489s saved, 55.9%).
Single local run; timings can vary with machine load, but this gives a direct before/after signal on this machine. |
Evangelink
enabled auto-merge (squash)
September 8, 2026 15:46
Co-authored-by: Copilot App <[email protected]> Copilot-Session: ba1785fb-ec67-45f3-8e5c-bfe27ae59b22
JeremyKuhne
approved these changes
Sep 9, 2026
Evangelink
had a problem deploying
to
copilot-pat-pool
September 9, 2026 04:59 — with
GitHub Actions
Failure
This branch had an error being deployed
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.

Summary
This is the independent replacement for the
compatibilitypartition of #56015, split according to the@dotnet/area-infrastructure-librariesCODEOWNERS boundary.ValidatePackageInProcessTestsPackageValidation class in MSTest's serial tail because each method runs pack/restore child processes and asserts on stderr, which can include concurrent shared-cache diagnostics.10× benchmark results
The combined Razor-fixed branch was measured on the same machine under an exclusive benchmark lock. Each iteration ran the identical 54 affected projects sequentially through
scripts/RunTests.cs, with the same 90-minute per-project timeout and the same exclusion for the pre-existing hanging interruption test.All 10 changed iterations completed with zero timeouts and retained exactly the same 10-project local-environment/prerequisite failure set as all 10 baseline iterations; there were no new or resolved failing projects. These combined-branch measurements provide performance and stability context, not isolated attribution or a per-slice tests-passed claim.
Representative project medians: PackageValidation improved 66.63%, GenAPI integration improved 29.62%, GenAPI unit tests improved 19.19%, and ApiDiff improved 11.18%; ApiCompat and ApiSymbolExtensions, both short-running projects, regressed by 1.892s and 7.701s respectively.