Skip to content

perf(test): remove Journaling.Tests dependency on Azure.Tests - #11665

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-journaling-test-dependency-tail
Nov 2, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-journaling-test-dependency-tail

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Problem

Orleans.Journaling.Tests referenced Orleans.Azure.Tests. The only thing it used from that reference was MetricCollector<T>, which it received transitively from Microsoft.Extensions.Diagnostics.Testing. As a result, Orleans.Journaling.Tests and Orleans.Journaling.Json.Tests could not compile until the whole Azure.Tests chain had built: Reminders.Tests, Runtime.Internal.Tests, Streaming.Tests and Runtime.Tests. In clean Orleans.slnx builds, those two projects were usually the last compilers to finish.

Change

  • Remove the Orleans.Azure.Tests project reference.
  • Reference Microsoft.Extensions.Diagnostics.Testing directly. The package is already pinned in Directory.Packages.props and resolves to the same versions as before: 8.10.0 for net8.0 and 10.3.0 for net10.0.

The Journaling.Json.Tests → Journaling.Tests reference stays, because Json.Tests uses its shared helpers.

Verification

All results below cover both net8.0 and net10.0.

  • Test discovery: identical, including theory arguments (1,272 Journaling tests, 152 Json tests).
  • Test results: identical per-test outcomes before and after:
    • Journaling: 1,125 passed, 147 skipped
    • Json: 152 passed
    • AzureStorage category against Azurite: 75 passed, 3 skipped
  • Dependency closure: packages and assemblies are only removed, with one exception. System.Security.Cryptography.ProtectedData now resolves to 4.5.0, the same version as TestExtensions, which owns the shared Azure token credential. Runtime.Tests, Runtime.Internal.Tests, Streaming.Tests and Reminders.Tests already use 4.5.0. The previous 8.0.0/10.0.3 came only from Azure.Tests' System.Diagnostics.PerformanceCounter dependency. A Windows DPAPI round-trip with the 4.5.0 runtime library succeeds.
  • Compiler work: the clean-build Csc/Fsc inventory is unchanged (294 Csc, 8 Fsc).

Build impact

These are clean dotnet build Orleans.slnx -m:32 runs on the rc.3 SDK, with npm ci in every sample, interleaved A-B-B-A then B-A-A-B. All times are in seconds.

Samples (s) Median (s)
Base (625b2ba) 115.1, 115.2, 107.1 115.1
This PR 119.7, 107.1, 106.6, 104.4 106.9

The base table leaves out one cold first build of a fresh worktree (188.0s).

The samples are noisy and the ranges overlap. A more conservative estimate holds every other project's schedule fixed: in the base runs, the last Journaling compile ends 0.9–3.2s after the last other compile. With this change, Journaling.Tests and Json.Tests finish 30–50s before the build ends and are never the last compiler. A focused Journaling build also no longer builds the Azure, Streaming, Reminders and Runtime test projects.

Microsoft Reviewers: Open in CodeFlow

Orleans.Journaling.Tests only used Orleans.Azure.Tests to transitively obtain Microsoft.Extensions.Diagnostics.Testing (MetricCollector). Reference that centrally pinned package directly so Journaling.Tests and Journaling.Json.Tests no longer wait for the Azure/Streaming/Reminders/Runtime test-project chain, which places both at the end of clean Orleans.slnx builds.

Discovered tests (including theory arguments) and per-test outcomes are unchanged on net8.0 and net10.0. System.Security.Cryptography.ProtectedData now resolves to 4.5.0, matching TestExtensions, which owns the shared Azure token credential.
Copilot AI balanced review requested due to automatic review settings November 2, 2026 06:37

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.

🟢 Approval recommended

No active review issues are reported for the test dependency change.

No open issues 🎉

What changed in this PR

This PR removes an unnecessary test-project dependency so Orleans journaling tests can build without waiting for the Azure test dependency chain.

Changes:

  • Replace the Orleans.Azure.Tests project reference with a direct Microsoft.Extensions.Diagnostics.Testing package reference for MetricCollector<T>.
  • Preserve shared test infrastructure references while reducing build dependencies for Journaling and its downstream JSON tests.
File Description
test/​Orleans.Journaling.Tests/​Orleans.Journaling.Tests.csproj Reference diagnostics testing directly and remove the Azure test-project dependency.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Code coverage

Metric Pull request
Lines 84.15% (121,372 / 144,230)
Branches 74.47% (36,793 / 49,405)

Report-only conclusion: current-main baseline stale.

The newest successful coverage run tested 9a0c764, not current main 625b2ba.

Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities.

The comparison remains report-only while normal line and branch variance is calibrated.

Coverage details

@ReubenBond
ReubenBond merged commit 4affb4d into dotnet:main Nov 2, 2026
95 checks passed
@ReubenBond
ReubenBond deleted the rb-journaling-test-dependency-tail branch November 2, 2026 14:18
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.

2 participants