Skip to content

Update to xunit v3#2440

Closed
martincostello wants to merge 7 commits into
mainfrom
xunit-v3
Closed

Update to xunit v3#2440
martincostello wants to merge 7 commits into
mainfrom
xunit-v3

Conversation

@martincostello

@martincostello martincostello commented Jan 10, 2025

Copy link
Copy Markdown
Member
  • Update to xunit v3.
  • Avoid infinite loop and throw if test times out.

Resolves #2439.

@martincostello martincostello added CI/build dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code labels Jan 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Files not reviewed (15)
  • Directory.Packages.props: Language not supported
  • eng/Test.targets: Language not supported
  • src/Snippets/Snippets.csproj: Language not supported
  • test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/BrokenCircuitExceptionTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/IsolatedCircuitExceptionTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/Fallback/FallbackHandlerTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerResiliencePipelineBuilderTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerOptionsTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerResilienceStrategyTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/Fallback/FallbackResiliencePipelineBuilderExtensionsTests.cs: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerStateProviderTests.cs: Evaluated as low risk
  • src/Snippets/Docs/Testing.cs: Evaluated as low risk
  • build.cake: Evaluated as low risk
  • test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerPredicateArgumentsTests.cs: Evaluated as low risk

@codecov

codecov Bot commented Jan 10, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.15%. Comparing base (593c67f) to head (2760015).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2440   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files         309      309           
  Lines        7128     7128           
  Branches     1005     1005           
=======================================
  Hits         6854     6854           
  Misses        221      221           
  Partials       53       53           
Flag Coverage Δ
linux 100.00% <ø> (+3.84%) ⬆️
macos 96.15% <ø> (ø)
windows 96.14% <ø> (ø)

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.

martincostello added a commit that referenced this pull request Jan 10, 2025
Takes some changes from #2440 which is blocked on support for xunit v3 in Stryker. with the aim of making #2440 a smaller change.

Contributes to #2439.
martincostello added a commit that referenced this pull request Jan 10, 2025
Takes some changes from #2440 which is blocked on support for xunit v3 in Stryker. with the aim of making #2440 a smaller change.

Contributes to #2439.
@martincostello martincostello force-pushed the xunit-v3 branch 3 times, most recently from 0d89f44 to 43001fd Compare January 13, 2025 17:17
@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the stale Stale issues or pull requests label Apr 14, 2025
@martincostello martincostello removed the stale Stale issues or pull requests label Apr 14, 2025
@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the stale Stale issues or pull requests label Jun 14, 2025
@martincostello martincostello removed the stale Stale issues or pull requests label Jun 14, 2025
@github-actions

This comment was marked as outdated.

@github-actions github-actions Bot added the stale Stale issues or pull requests label Aug 14, 2025
@martincostello martincostello added keep-open Prevents an issue or pull request from being marked as stale and removed stale Stale issues or pull requests labels Aug 14, 2025
martincostello added a commit that referenced this pull request Aug 23, 2025
Cherry-pick changes from #2440 to prepare to switch to xunit v3.
martincostello added a commit that referenced this pull request Aug 23, 2025
Cherry-pick changes from #2440 to prepare to switch to xunit v3.
Update to xunit v3.

Resolves #2439.
Comment thread Directory.Packages.props Outdated
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
<PackageVersion Include="xunit.v3" Version="3.0.1" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider using xunit.v3.mtp-v2 instead. Latest version is 3.2.1.

Comment thread Directory.Packages.props Outdated
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This shouldn't be needed if you intend to also run with MTP.

Comment thread eng/Test.targets Outdated
Use `xunit.v3.mtp-v2` instead of `xunit.v3`.
Comment thread eng/Test.targets Outdated
Remove now-redundant reference to xunit.runner.visualstudio.
Comment thread src/Snippets/Snippets.csproj Outdated
Remove redundant package reference.
Switch to using FsCheck.Xunit.v3.
GitHubActionsTestLogger isn't strong-named which means MTP can't compile due to the strong-name requirement, so disable it.
@martincostello

Copy link
Copy Markdown
Member Author

Styker tests are still broken both without MTP (stryker-mutator/stryker-net#3117) and with MTP (stryker-mutator/stryker-net#3094).

Unit tests only work with MTP disabled, otherwise the fact GitHubActionsTestLogger isn't strong-named becomes a problem and causes test compilation to fail.

@martincostello

Copy link
Copy Markdown
Member Author

I'm going to close this out as it's otherwise about to reach its first birthday. We can revisit in the future if/when stryker supports MTP.

@martincostello martincostello deleted the xunit-v3 branch January 9, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/build dependencies Pull requests that update a dependency file keep-open Prevents an issue or pull request from being marked as stale .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to xunit v3

3 participants