From ff30543a5c8c965b38d6e042c2a04c3ad5323047 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 8 Sep 2023 16:48:06 +0530 Subject: [PATCH] Added extra buffer for incremental backoff and jitter checks --- .../Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs index 417f0a58f..32794695d 100644 --- a/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs +++ b/src/IO.Ably.Tests.Shared/Realtime/ConnectionSpecs/ConnectionFailureSpecs.cs @@ -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); } }