Skip to content

Conversation

@martincostello
Copy link
Member

Cherry-pick changes from #2440 to prepare to switch to xunit v3.

Cherry-pick changes from #2440 to prepare to switch to xunit v3.
@codecov
Copy link

codecov bot commented Aug 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.12%. Comparing base (b7321af) to head (812d090).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2723   +/-   ##
=======================================
  Coverage   96.12%   96.12%           
=======================================
  Files         309      309           
  Lines        7118     7118           
  Branches     1008     1008           
=======================================
  Hits         6842     6842           
  Misses        222      222           
  Partials       54       54           
Flag Coverage Δ
linux 96.12% <100.00%> (ø)
macos 96.12% <100.00%> (ø)
windows 96.11% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Exclude helper from coverage.
- Update incorrect comment.
@martincostello martincostello marked this pull request as ready for review August 23, 2025 13:06
Copilot AI review requested due to automatic review settings August 23, 2025 13:06
@martincostello martincostello enabled auto-merge (squash) August 23, 2025 13:06
@martincostello martincostello merged commit 6d5fcd6 into main Aug 23, 2025
26 checks passed
@martincostello martincostello deleted the xunit-v3-prep branch August 23, 2025 13:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prepares the codebase for xunit v3 by introducing a shared TestCancellation utility and standardizing test cancellation token usage across the entire test suite. The changes improve test consistency and prepare for potential future xunit compatibility requirements.

Key changes:

  • Addition of TestCancellation.Token helper to centralize test cancellation token management
  • Systematic replacement of CancellationToken.None with TestCancellation.Token in all test files
  • Addition of thread-safe semaphore release logic in production code to prevent ObjectDisposedException

Reviewed Changes

Copilot reviewed 128 out of 128 changed files in this pull request and generated no comments.

File Description
test/Shared/TestCancellation.cs New shared utility providing centralized test cancellation token
Multiple test project .csproj files Added references to shared TestCancellation utility
100+ test files Replaced CancellationToken.None with TestCancellation.Token throughout
src/Polly/Bulkhead/BulkheadEngine.cs Added safe semaphore release to prevent ObjectDisposedException

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants