Enable safe TemplateEngine test parallelization - #55993
Open
Evangelink wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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
Review tier: Lite
Findings: None
What changed in this PR
This PR opts five TemplateEngine MSTest.Sdk test projects into conservative class-level parallel execution by overriding the repo default (test/Directory.Build.props sets MSTestParallelizeScope=None). The intent is to allow independent test classes to overlap while keeping methods within each class serialized to avoid class-scoped shared state conflicts.
Changes:
- Set
<MSTestParallelizeScope>ClassLevel</MSTestParallelizeScope>in five TemplateEngine test.csprojfiles. - Add explanatory comments in each project file describing the intended isolation/serialization boundary (methods serialized within a class; classes may run concurrently).
| File | Description |
|---|---|
| test/TemplateEngine/Microsoft.TemplateSearch.TemplateDiscovery.IntegrationTests/Microsoft.TemplateSearch.TemplateDiscovery.IntegrationTests.csproj | Enables MSTest class-level parallelization for template discovery integration tests while keeping per-class method runs serial. |
| test/TemplateEngine/Microsoft.TemplateSearch.Common.UnitTests/Microsoft.TemplateSearch.Common.UnitTests.csproj | Enables class-level parallelization for TemplateSearch common unit tests, preserving class-internal serialization for shared fixtures. |
| test/TemplateEngine/Microsoft.TemplateEngine.Utils.UnitTests/Microsoft.TemplateEngine.Utils.UnitTests.csproj | Enables class-level parallelization for TemplateEngine utils unit tests across TFMs, keeping method runs serial within each class. |
| test/TemplateEngine/Microsoft.TemplateEngine.TemplateLocalizer.Core.UnitTests/Microsoft.TemplateEngine.TemplateLocalizer.Core.UnitTests.csproj | Enables class-level parallelization for TemplateLocalizer core unit tests with method serialization within each class. |
| test/TemplateEngine/Microsoft.TemplateEngine.Edge.UnitTests/Microsoft.TemplateEngine.Edge.UnitTests.csproj | Enables class-level parallelization for TemplateEngine edge unit tests, preserving class-internal serialization for shared state. |
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.
These TemplateEngine test projects currently run serially despite having independent test-class fixtures. This opts them into conservative class-level parallelism so independent classes can overlap without exposing method-scoped shared state to concurrency.
Summary
MSTestParallelizeScope=ClassLevelin five TemplateEngine utility, search, localization, edge, and discovery test projects.DoNotParallelizebecause the audited shared state is contained within individual classes.Validation
Local test and benchmark execution was intentionally deferred so the change can be measured in the coordinated 10-run baseline/changed full-fleet benchmark after integration.