Skip to content

Commit

Permalink
chore: Fix failing HTTP/2 retry test #4205 (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren authored Jun 7, 2023
1 parent 1011bac commit 13ec800
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,15 @@ abstract class Http2PersistentClientSpec(tls: Boolean) extends AkkaSpecWithMater
if (withBackoff) {
// not immediate when using backoff, 4 retries before failing, backoff is 300-800ms (so at least 1.2s)
client.responsesIn.expectNoMessage(clientSettings.http2Settings.baseConnectionBackoff * 4)
// total max backoff for 4 tries with the random factor could actually worst case be something
// like 600 + 800 + 800 + 800 - those 1200 ms = 1800 ms, but no way to pass a timeout to expectError
awaitAssert({
client.responsesIn.expectError()
}, 1800.millis)
} else {
// directly
client.responsesIn.expectError()
}
client.responsesIn.expectError()
client.requestsOut.expectCancellation()

}
Expand Down

0 comments on commit 13ec800

Please sign in to comment.