kazoo icon indicating copy to clipboard operation
kazoo copied to clipboard

fix(core): Proper retry count in KazooRetry

Open ceache opened this issue 1 year ago • 1 comments

Make sure the number of attempts matches the max_retry parameter. Add unit tests to that effect.

Why is this needed?

So that users can precisely control the number of retries

Proposed Changes

  • Move the location of the attempt increase to before the check against max_try so we don't end up calling max_tries + 1 times the function.

Does this PR introduce any breaking change?

No, it shouldn't.

ceache avatar Mar 11 '24 03:03 ceache

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.01%. Comparing base (2fb93a8) to head (73309b2). Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #748      +/-   ##
==========================================
+ Coverage   96.81%   97.01%   +0.19%     
==========================================
  Files          27       27              
  Lines        3549     3549              
==========================================
+ Hits         3436     3443       +7     
+ Misses        113      106       -7     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 11 '24 03:03 codecov[bot]