@@ -400,9 +400,9 @@ internal class RetryingHttpClientTest {
400400 assertThat(sleeper.durations).hasSize(3 )
401401 // retries=1: 0.5s * [0.75, 1.0]
402402 assertThat(sleeper.durations[0 ]).isBetween(Duration .ofMillis(375 ), Duration .ofMillis(500 ))
403- // retries=2: 1.0s * [0.75, 1.0]
403+ // retries=2: 1s * [0.75, 1.0]
404404 assertThat(sleeper.durations[1 ]).isBetween(Duration .ofMillis(750 ), Duration .ofMillis(1000 ))
405- // retries=3: 2.0s * [0.75, 1.0]
405+ // retries=3: 2s * [0.75, 1.0]
406406 assertThat(sleeper.durations[2 ]).isBetween(Duration .ofMillis(1500 ), Duration .ofMillis(2000 ))
407407 assertNoResponseLeaks()
408408 }
@@ -427,9 +427,9 @@ internal class RetryingHttpClientTest {
427427 assertThat(response.statusCode()).isEqualTo(503 )
428428 verify(7 , postRequestedFor(urlPathEqualTo(" /something" )))
429429 assertThat(sleeper.durations).hasSize(6 )
430- // retries=5: min(0.5 * 2^4, 8) = 8.0s * [0.75, 1.0]
430+ // retries=5: backoff hits the 8s cap * [0.75, 1.0]
431431 assertThat(sleeper.durations[4 ]).isBetween(Duration .ofMillis(6000 ), Duration .ofMillis(8000 ))
432- // retries=6: min(0.5 * 2^5, 8) = min(16, 8) = 8.0s * [0.75, 1.0] (capped)
432+ // retries=6: still capped at 8s * [0.75, 1.0]
433433 assertThat(sleeper.durations[5 ]).isBetween(Duration .ofMillis(6000 ), Duration .ofMillis(8000 ))
434434 assertNoResponseLeaks()
435435 }
0 commit comments