Skip to content

test(codegen): pass cancellation token to diagnostics - #10878

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-raise-code-coverage
Aug 28, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-raise-code-coverage

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Fixes #10856.

Passes TestContext.Current.CancellationToken to Roslyn diagnostic collection in GeneratedWarningSuppressionTests, satisfying xUnit1051 and restoring warning-as-error builds for the test project.

This keeps cancellation flowing through the potentially long-running diagnostic operation without changing the test's assertions or generated-code behavior.

Microsoft Reviewers: Open in CodeFlow

Copilot AI lite review requested due to automatic review settings August 27, 2026 23:26

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 fixes the test project build break caused by xUnit1051 by ensuring Roslyn diagnostic collection in GeneratedWarningSuppressionTests respects xUnit’s cancellation flow, restoring warning-as-error builds without changing test intent.

Changes:

  • Passes TestContext.Current.CancellationToken into CSharpCompilation.GetDiagnostics(...) for the obsolete-warning suppression assertions.
File Description
test/​Orleans.CodeGenerator.Tests/​GeneratedWarningSuppressionTests.cs Threads TestContext.Current.CancellationToken into Roslyn diagnostics collection to satisfy xUnit1051 and keep cancellation propagation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ReubenBond

Copy link
Copy Markdown
Member Author

CI restore failures in this run are unrelated to this change: Azure DevOps NuGet feeds are returning HTTP 500 / Maximum waiter thread limit 500 is reached across 21+ matrix jobs. Local dotnet build Orleans.slnx -bl succeeds at 7057ea85e1, and the focused tests pass. Tracked in #10881; failed jobs should be rerun after feed recovery.

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage

78.54% line coverage - 99,430 / 126,605 lines

Coverage details

@ReubenBond

Copy link
Copy Markdown
Member Author

The Azure DevOps NuGet feed recovered. Failed-job rerun attempt 2 completed successfully: all 75 PR checks now pass.

@ReubenBond
ReubenBond merged commit 3c46ba6 into dotnet:main Aug 28, 2026
119 of 141 checks passed
@ReubenBond
ReubenBond deleted the rb-raise-code-coverage branch August 28, 2026 00:31
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.

CI failure: xUnit1051 blocks all test jobs after #10845

2 participants