Skip to content

Commit

Permalink
Merge pull request #6853 from taskcluster/issue6852
Browse files Browse the repository at this point in the history
Issue 6852 - increase max retry count in TestExponentialBackoffFailure
  • Loading branch information
petemoore authored Feb 22, 2024
2 parents e9ee3b9 + c306f37 commit a12793e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changelog/issue-6852.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
audience: general
level: silent
reference: issue 6852
---
17 changes: 10 additions & 7 deletions tools/websocktunnel/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,16 @@ func TestExponentialBackoffFailure(t *testing.T) {
t.Fatalf("should not run for more than %d milliseconds", maxTime)
}

// Note, sometimes 11 requests occur, presumably because the attempts occur
// when clock is 0ms, 200ms, 400ms, 600ms, 800ms, 1000ms, 1200ms, 1400ms,
// 1600ms, 1800ms, 2000ms, or there is a timeout go routine that isn't
// guaranteed to be immediately scheduled after 2 seconds. We may even
// want to bump the limit to 12, no need to be super strict here. Let's see
// how it is with 11 for now.
if count > 11 || count < 4 {
// Under load we have seen as many as 13 attempts before the timeout has
// taken effect, even though technically 13 attempts, which would includes
// 12x 200ms timeouts, should not be possible in 2s. But no need to be
// super strict here; websocktunnel doesn't run on a RTOS. Let's generously
// allow 15 retries.
//
// See:
// * https://github.com/taskcluster/taskcluster/issues/6414
// * https://github.com/taskcluster/taskcluster/issues/6852
if count > 15 || count < 4 {
t.Fatalf("wrong number of retries: %d", count)
}
}
Expand Down

0 comments on commit a12793e

Please sign in to comment.