Skip to content

[release/9.0-staging] [Test Only] Accept both ICU mappings for Pacific Standard Time in Canada - #137106

Merged
ViveliDuCh merged 1 commit into
dotnet:release/9.0-stagingfrom
ViveliDuCh:backport-136942-release-9.0-staging
Nov 9, 2026
Merged

ViveliDuCh merged 1 commit into
dotnet:release/9.0-stagingfrom
ViveliDuCh:backport-136942-release-9.0-staging

Conversation

@ViveliDuCh

Copy link
Copy Markdown
Member

Fixes Issue #136758

main PR #136942

Description

Manual backport of #136942 to release/9.0-staging, following the .NET 8 backport in #136982.

Allow IdsConversionsWithRegionTest to accept either America/Vancouver or America/Los_Angeles for Pacific Standard Time with region CA, depending on the ICU mapping data installed on the test host. The theory accepts a params string[] of expected IDs and uses Assert.Contains. All other 22 cases retain a single accepted value.

The port uses the .NET 9 test-file location and preserves the branch's existing [ConditionalTheory(nameof(SupportIanaNamesConversion))] attribute. There are no product or public API changes.

Customer Impact

Without this change, the test fails on hosts with updated ICU mappings, producing unrelated CI failures and potentially blocking servicing validation. This is a test-only fix, not a change to the conversion result applications receive.

Regression

No product regression. The test's hardcoded expected mapping does not account for newer external ICU data.

Testing

Compiled the exact modified theory method and all 23 InlineData rows extracted from this branch in a temporary standalone xUnit project targeting .NET 9, replacing only the conditional theory attribute with [Theory] in the temporary harness. Verified that the extracted method and all data rows match the merged main fix exactly.

From the temporary harness directory:

dotnet test BackportTheoryValidation.csproj --framework net9.0 --logger 'trx;LogFileName=net9.trx'

Passed on Windows with .NET 9: 23 passed, zero failed, zero skipped.

From the release worktree:

dotnet build src\libraries\System.Runtime\tests\System.Runtime.Tests\System.Runtime.Tests.csproj /t:Test /p:XunitMethodName=System.Tests.TimeZoneInfoTests.IdsConversionsWithRegionTest

Blocked before test execution: build failed in eng\targetingpacks.targets because the local shared framework has not been built ("The shared framework must be built before the local targeting pack can be consumed."). Full release-branch prerequisite builds were not run.

git --no-pager diff --check

Passed.

Execution with updated ICU data was not tested locally.

Risk

Low. Only one existing test is changed. The condition controlling when it runs is unchanged, and only the Canadian Pacific mapping gains an additional accepted result. No shipping code, package contents, or public contracts change.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

Not applicable: test-only change; no shipping package code is modified.

Backport dotnet#136942 to release/9.0-staging, preserving the existing conditional theory attribute.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 47e18cbb-9907-4b6c-bada-f9595cbbdd8a
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-datetime
See info in area-owners.md if you want to be subscribed.

@ViveliDuCh

Copy link
Copy Markdown
Member Author

/ba-g just infra flakiness (dotnet linker) and known test errors

@ViveliDuCh

Copy link
Copy Markdown
Member Author

Test only backport/fix, applying servicing-approved label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.DateTime Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants