Repository navigation
Parallelize Web SDK publish task tests - #56037
Merged
Evangelink merged 1 commit intoSep 9, 2026
Merged
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
🟢 Approval recommended
Review tier: Lite
Findings: None
What changed in this PR
Enables safe parallel execution for the Microsoft.NET.Sdk.Publish.Tasks.Tests MSTest project by opting into class-level parallelization and serializing the one test class that mutates process-wide environment variables while ensuring the original value is restored.
Changes:
- Opt into MSTest
ClassLevelparallelization forMicrosoft.NET.Sdk.Publish.Tasks.Tests. - Add a
[ResourceLock(WellKnownResources.EnvironmentVariables)]toEnvironmentHelperTestsand wrap environment-variable mutation in atry/finallyrestore.
| File | Description |
|---|---|
| test/Microsoft.NET.Sdk.Publish.Tasks.Tests/Microsoft.NET.Sdk.Publish.Tasks.Tests.csproj | Opts this test project into MSTestParallelizeScope=ClassLevel to enable parallel execution. |
| test/Microsoft.NET.Sdk.Publish.Tasks.Tests/EnvironmentHelperTests.cs | Adds an environment-variable resource lock and ensures the original env var value is restored via finally. |
Evangelink
enabled auto-merge (squash)
September 1, 2026 10:59
Member
Author
Local before/after benchmarkLocal gain confirmed on my Windows machine using the SDK repo test runner.
Comparable clean total: 1m 21.2s before -> 48.782s after (32.403s saved, 39.9%).
Single local run; timings can vary with machine load, but this gives a direct before/after signal on this machine. |
JeremyKuhne
approved these changes
Sep 9, 2026
Evangelink
had a problem deploying
to
copilot-pat-pool
September 9, 2026 05:41 — 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
web-sdkCODEOWNERS split from #56015 for @vijayrkn.ClassLevelparallel execution forMicrosoft.NET.Sdk.Publish.Tasks.Tests.EnvironmentHelperTestsprocess-wide environment-variable mutation with a resource lock and restores the original value in afinallyblock.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.
Publish Tasks improved from 91.289s to 60.488s (33.74%). The separate Web SDK integration project changed from 76.554s to 87.752s in the complete benchmark.