Skip to content

Commit a12793e

Browse files
authored
Merge pull request #6853 from taskcluster/issue6852
Issue 6852 - increase max retry count in TestExponentialBackoffFailure
2 parents e9ee3b9 + c306f37 commit a12793e

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

changelog/issue-6852.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
audience: general
2+
level: silent
3+
reference: issue 6852
4+
---

tools/websocktunnel/client/client_test.go

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,16 @@ func TestExponentialBackoffFailure(t *testing.T) {
114114
t.Fatalf("should not run for more than %d milliseconds", maxTime)
115115
}
116116

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

0 commit comments

Comments
 (0)