Skip to content

Commit 753aabe

Browse files
authored
Fix background ping test edgecase (#205)
1 parent c9504dd commit 753aabe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/announces.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ test('announcer background does not over-trigger', async function (t) {
177177
// give some time for possible background spam
178178
await new Promise(resolve => setTimeout(resolve, 500))
179179

180-
const requestsSent = initTid > 65536 - 50
180+
const requestsSent = initTid > a.io._tid // it wrapped?
181181
? a.io._tid // close enough for this test (ignoring those before wrapping)
182182
: a.io._tid - initTid
183183

184184
t.ok(
185185
requestsSent < 50,
186-
'No background spam of ping requests'
186+
`No background spam of ping requests (saw ${requestsSent})`
187187
)
188188

189189
await a.destroy()

0 commit comments

Comments
 (0)