Remove redundant [DoNotParallelize] from serialized test projects#55091
Merged
Conversation
These test projects inherit the repo-wide MSTestParallelizeScope=None default from test/Directory.Build.props, which already emits [assembly: DoNotParallelize] and fully serializes the assembly. The class-level [DoNotParallelize] attributes are therefore no-ops. Remove them to reduce noise; if a project ever opts in to parallelization, the guard should be added deliberately with a documented reason. The three classes that document a specific concurrency hazard (process CWD / environment-variable mutation) keep their [DoNotParallelize] and are not touched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes redundant class-level [DoNotParallelize] attributes from MSTest.Sdk-based test projects that are already assembly-serialized via the repo’s test/Directory.Build.props default (<MSTestParallelizeScope>None</MSTestParallelizeScope>), reducing noise without changing current execution semantics.
Changes:
- Deleted class-level
[DoNotParallelize]attributes from multiple TemplateEngine unit/integration test classes. - Deleted class-level
[DoNotParallelize]attributes from selected StaticWebAssets, Razor, Containers integration, and dotnet-new integration test classes. - Kept project-level serialization intact (these projects are
Sdk="MSTest.Sdk"and inherit/overrideMSTestParallelizeScope=None, so MSTest remains non-parallel at the assembly level).
Show a summary per file
| File | Description |
|---|---|
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValueFormTests/TemplateJsonDefinedFormsTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValueFormTests/FirstUpperCaseValueFormTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValueFormTests/FirstUpperCaseInvariantValueFormModel.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValueFormTests/FirstLowerCaseValueFormTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValueFormTests/FirstLowerCaseInvariantValueFormTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ValidationTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/TemplateRootTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/SplitConfigurationTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/SourceConfigTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/PostActionTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/LocalizationTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/TemplateConfigTests/FileRenameTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/SnapshotTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/ScanTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/RunnableProjectGeneratorTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/RunnableProjectConfigTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/SwtichMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/RegexMatchMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/RegexMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/RandomMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/NowMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/JoinMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/GuidMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/GeneratePortMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/FakeMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/EvaluateMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/ConstantMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/CoalesceMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroTests/CaseChangeMacroTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/MacroProcessorTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests/BindSymbolTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/SnapshotTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/LocalizationTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/End2EndTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/ConfigurationTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.IDE.IntegrationTests/BasicTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Edge.UnitTests/TemplatePackageManagerTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Edge.UnitTests/TemplateCreatorTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Edge.UnitTests/FolderInstallerTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Authoring.TemplateVerifier.UnitTests/VerificationEngineTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Authoring.TemplateVerifier.IntegrationTests/VerificationEngineTests.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Authoring.TemplateVerifier.IntegrationTests/TemplateEngineSamplesTest.cs | Remove redundant class-level [DoNotParallelize]. |
| test/TemplateEngine/Microsoft.TemplateEngine.Authoring.TemplateVerifier.IntegrationTests/ExampleTemplateTest.cs | Remove redundant class-level [DoNotParallelize]. |
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssets/GenerateStaticWebAssetsPropsFileMultiThreadingTest.cs | Remove redundant class-level [DoNotParallelize] (assembly already serialized). |
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssets/GenerateStaticWebAssetsManifestMultiThreadingTest.cs | Remove redundant class-level [DoNotParallelize] (assembly already serialized). |
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/StaticWebAssets/ComputeReferenceStaticWebAssetItemsTest.cs | Remove redundant class-level [DoNotParallelize] (assembly already serialized). |
| test/Microsoft.NET.Sdk.Razor.Tests/FindAssembliesWithReferencesToMultiThreadingTest.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/TargetsTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/ParseContainerPropertiesTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/LayerEndToEndTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/Microsoft.NET.Build.Containers.IntegrationTests/CreateImageIndexTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/dotnet-new.IntegrationTests/TemplateEngineSamplesTest.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
| test/dotnet-new.IntegrationTests/DotnetNewLocaleTests.cs | Remove redundant class-level [DoNotParallelize] (inherits repo MSTest serialization). |
Copilot's findings
- Files reviewed: 56/56 changed files
- Comments generated: 0
MichaelSimons
approved these changes
Jul 1, 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.
What
Remove redundant class-level
[DoNotParallelize]attributes from 56 test files.Why they are no-ops today
Every affected project inherits the repo-wide default in
test/Directory.Build.props:Nonemakes MSTest.Sdk emit[assembly: DoNotParallelize], which already fully serializes the entire assembly. A class-level[DoNotParallelize]on top of that changes nothing, so these attributes are dead configuration.Removing them reduces noise and prevents the false impression that a specific class has a concurrency hazard being guarded. If a project ever opts in to parallelization (as done for the true unit-test projects in #55090), the guard should be re-added deliberately, next to a comment explaining the shared state it protects.
Kept intentionally
Three classes that document a real concurrency hazard keep their
[DoNotParallelize]and are not touched:GenerateStaticWebAssetsDevelopmentManifestMultiThreadingTest(mutates process CWD; documented)AuthHandshakeMessageHandlerTests,DockerDaemonTests(env-var mutation; added in Enable method-level parallelization for true unit test projects #55090)Scope
Affects Containers integration tests, dotnet-new integration tests, Razor, StaticWebAssets, and the TemplateEngine test suites. Pure attribute deletions — no behavior change (assemblies remain serialized via the
Nonedefault). A representative TemplateEngine unit-test project builds clean (0 warnings) after the change.