Skip to content

Enable parallelism in Watch unit tests - #55995

Merged
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/watch-parallel-audit
Aug 28, 2026
Merged

Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/watch-parallel-audit

Conversation

@Evangelink

Copy link
Copy Markdown
Member

These three Watch unit test projects currently inherit repository-wide serial execution even though their tests do not share mutable process resources. Running independent methods concurrently should reduce test latency without introducing cross-test interference.

Summary

  • Enable MSTest MethodLevel parallelization for Browser Refresh, Hot Reload Client, and Watch Aspire unit tests.
  • Keep all tests parallel rather than adding ResourceLock or DoNotParallelize, based on an audit of ports, pipes, processes, static state, environment variables, current directory, console access, and file writes.
  • Limit the change to the three project files.

Validation

  • Completed a static full-project parallel-safety audit.
  • Consolidated 10-run baseline and changed benchmarks are being run separately across the full parallelization change set.

Copilot AI lite review requested due to automatic review settings August 28, 2026 15:21
@Evangelink
Evangelink requested a review from a team as a code owner August 28, 2026 15:21
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review tier: Lite
Findings: None

What changed in this PR

This PR opts three Watch-related MSTest projects into parallel execution by overriding the repository-wide default (test/Directory.Build.props sets MSTestParallelizeScope=None) and enabling method-level parallelism to reduce unit test wall-clock time.

Changes:

  • Set <MSTestParallelizeScope>MethodLevel</MSTestParallelizeScope> in the Browser Refresh, Hot Reload Client, and Watch Aspire unit test projects.
  • Keep the scope limited to project-file opt-ins (no per-test [DoNotParallelize] / resource locks added in this PR).
File Description
test/​Microsoft.DotNet.HotReload.Watch.Aspire.Tests/​Microsoft.DotNet.HotReload.Watch.Aspire.Tests.csproj Opts the Aspire Watch unit tests into MSTest method-level parallelization.
test/​Microsoft.DotNet.HotReload.Client.Tests/​Microsoft.DotNet.HotReload.Client.Tests.csproj Opts the Hot Reload Client unit tests (including multi-targeting) into method-level parallelization.
test/​Microsoft.AspNetCore.Watch.BrowserRefresh.Tests/​Microsoft.AspNetCore.Watch.BrowserRefresh.Tests.csproj Opts the Browser Refresh unit tests into MSTest method-level parallelization.

@Evangelink
Evangelink merged commit 3032e00 into dotnet:main Aug 28, 2026
22 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/watch-parallel-audit branch August 28, 2026 17:08
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 29, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 5447274b Deployed Aug 28, 2026 by Evangelink via pre_activation #1608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants