Skip to content

Conversation

@ns-vasilev
Copy link
Member

No description provided.

…l unit

The exponential backoff calculation could lead to a fatal error due to Double to UInt64 conversion overflow when the number of retries was high.

This commit address two issues:
1. Prevents `UInt64` overflow by checking against `UInt64.max` before casting the calculated delay value
2. Refactors `maxInterval` to accept `DispatchTimeInterval?` instead of `UInt64?` to standardize the API and simplify usage for consumers
@ns-vasilev ns-vasilev self-assigned this Dec 13, 2025
@ns-vasilev ns-vasilev requested a review from a team as a code owner December 13, 2025 09:13
@spacecode-github-bot
Copy link

2 Warnings
⚠️

⚠️ Some source files are missing corresponding test files:

  • RetryIterator → expected test file: RetryIteratorTests.swift
⚠️ Public API changed but no documentation updates found
1 Message
📖

ℹ️ Some source files have tests that weren't updated:

  • RetryPolicyStrategy → test file exists: RetryPolicyStrategyTests.swift (consider updating if logic changed)

Generated by 🚫 Danger

@ns-vasilev ns-vasilev merged commit ae9ed23 into main Dec 13, 2025
24 checks passed
@ns-vasilev ns-vasilev deleted the fix/jitter branch December 13, 2025 09:40
@codecov
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

❌ Patch coverage is 98.98990% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.40%. Comparing base (6916381) to head (27dc17e).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...Classes/RetrySequence/Iterator/RetryIterator.swift 97.37% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   99.09%   99.40%   +0.31%     
==========================================
  Files          10       10              
  Lines         331      502     +171     
==========================================
+ Hits          328      499     +171     
  Misses          3        3              
Files with missing lines Coverage Δ
...Typhoon/Classes/Strategy/RetryPolicyStrategy.swift 100.00% <ø> (ø)
...ts/TyphoonTests/UnitTests/RetrySequenceTests.swift 100.00% <100.00%> (ø)
...Classes/RetrySequence/Iterator/RetryIterator.swift 97.96% <97.37%> (+3.51%) ⬆️

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.

3 participants