Skip to content

Centralize RuntimeVersions list in DumpTestBase#127102

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/update-cdac-dump-test-framework
Draft

Centralize RuntimeVersions list in DumpTestBase#127102
Copilot wants to merge 1 commit intomainfrom
copilot/update-cdac-dump-test-framework

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 18, 2026

"local" and "net10.0" were duplicated across two methods — once as separate if branches in TestConfigurations and once as an inline new[] { "local", "net10.0" } in GetDumpSource(). Adding a new runtime version required editing two unrelated code paths.

Description

Extracted a single private static readonly string[] RuntimeVersions = ["local", "net10.0"] field that both TestConfigurations and GetDumpSource() now iterate over:

  • TestConfigurations — replaced the pair of if (!IsVersionSkipped("local")) / if (!IsVersionSkipped("net10.0")) branches with a foreach over RuntimeVersions
  • GetDumpSource() — replaced new[] { "local", "net10.0" } with RuntimeVersions

New runtime versions now require a single-line change in one place.

…gurations and GetDumpSource

Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/abad0672-00fa-4cc2-960b-65b41cd0ac62

Co-authored-by: max-charlamb <44248479+max-charlamb@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 18, 2026 01:00
Copilot AI review requested due to automatic review settings April 18, 2026 01:00
@max-charlamb max-charlamb requested a review from hoyosjs April 18, 2026 01:00
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

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.

2 participants