Skip to content

Parallelize ApiDiff unit tests - #55944

Merged
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/parallelize-apidiff-tests
Sep 9, 2026
Merged

Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/parallelize-apidiff-tests

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Microsoft.DotNet.ApiDiff.Tests currently runs serially despite having isolated per-test state, which unnecessarily lengthens validation.

This opts the project into MSTest method-level parallelization after auditing all 19 test classes and 173 methods. Tests use per-instance state, unique temporary directories, read-only shared inputs, and stateless shared rewriters, so no resource locks are required.

Validation: the focused 173-test suite passed four consecutive runs with 32 method-level workers (170 passed, 3 existing skips, 0 failed).

Copilot AI lite review requested due to automatic review settings August 26, 2026 15:05
@Evangelink
Evangelink requested a review from a team as a code owner August 26, 2026 15:05
@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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@Evangelink

Copy link
Copy Markdown
Member Author

Local before/after benchmark

No comparable clean result on my Windows machine using the SDK repo test runner.

  • Machine: Microsoft Windows 11 Enterprise, AMD RYZEN AI MAX+ 395 w/ Radeon 8060S , 32 logical processors
  • Baseline: origin/main (890dd7f)
  • PR head: dev/amauryleve/parallelize-apidiff-tests (b81fab5)
  • Command shape: .\.dotnet\dotnet.exe scripts\RunTests.cs -- --project <project>
  • Reported numbers use the test run duration from the runner output; build/setup wall-clock is excluded.
Project Before After Delta Result
Microsoft.DotNet.ApiDiff.Tests 6.791s failed n/a head failed: dotnet-prefixed command not found during runner invocation

Single local run; timings can vary with machine load, but this gives a direct before/after signal on this machine.

@Evangelink
Evangelink enabled auto-merge (squash) September 9, 2026 05:42
@Evangelink

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
2 pipeline(s) were filtered out due to trigger conditions.

@Evangelink
Evangelink merged commit 260b8f1 into dotnet:main Sep 9, 2026
30 of 32 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 10, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — b81fab57 Deployed Sep 9, 2026 by Evangelink via pre_activation #3651
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants