Skip to content

Commit

Permalink
Added extra buffer for incremental backoff and jitter checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Sep 8, 2023
1 parent 46aa89b commit ff30543
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ public async Task WhenInDisconnectedState_ReconnectUsingIncrementalBackoffTimeou

// Upper bound = min((retryAttempt + 2) / 3, 2) * initialTimeout
// Lower bound = 0.8 * Upper bound
disconnectedRetryTimeouts[0].Should().BeInRange(4, 5);
disconnectedRetryTimeouts[1].Should().BeInRange(5.33, 6.66);
disconnectedRetryTimeouts[2].Should().BeInRange(6.66, 8.33);
disconnectedRetryTimeouts[0].Should().BeInRange(4, 5 + 0.20);
disconnectedRetryTimeouts[1].Should().BeInRange(5.33, 6.66 + 0.20);
disconnectedRetryTimeouts[2].Should().BeInRange(6.66, 8.33 + 0.20);
for (var i = 3; i < disconnectedRetryTimeouts.Count; i++)
{
disconnectedRetryTimeouts[i].Should().BeInRange(8, 10);
disconnectedRetryTimeouts[i].Should().BeInRange(8, 10 + 0.20);
}
}

Expand Down

0 comments on commit ff30543

Please sign in to comment.