Skip to content

Conversation

@martincostello
Copy link
Member

Apply recommendations/fixes suggested by Copilot in #2830.

Apply recommendations/fixes suggested by Copilot in #2830.
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 applies fixes to property-based tests that were previously recommended in PR #2830, correcting test specifications and fixing a pragma directive issue.

  • Corrected property-based test assertions to properly handle edge cases where values can equal boundaries
  • Fixed test range calculations to accurately reflect actual implementation behavior
  • Fixed mismatched pragma warning directive

Reviewed changes

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

File Description
test/Polly.Core.Tests/Retry/RetryHelperTests.cs Corrected jitter delta calculation from /2 to /4, updated assertions to use ShouldBeGreaterThanOrEqualTo for edge cases, set floor to TimeSpan.Zero for DecorrelatedJitterBackoffV2 test, and changed maximum test value to 2048 (power of 2)
src/Polly.Core/Retry/RetryHelper.cs Fixed pragma warning directive from disable to restore to properly close the warning suppression block

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2831   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files         309      309           
  Lines        7123     7123           
  Branches     1005     1005           
=======================================
  Hits         6849     6849           
  Misses        221      221           
  Partials       53       53           
Flag Coverage Δ
linux 96.15% <ø> (ø)
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 martincostello merged commit 402adfa into main Nov 24, 2025
34 checks passed
@martincostello martincostello deleted the update-property-tests branch November 24, 2025 16:27
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