Skip to content

Commit bae8de6

Browse files
committed
Add expectedRetryCount in test
1 parent 4c3e782 commit bae8de6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/seam/connect/retry.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@ import { SeamHttp } from '@seamapi/http/connect'
66

77
test('SeamHttp: retries 503 status errors twice by default ', async (t) => {
88
const { seed, endpoint, db } = await getTestServer(t)
9+
const expectedRetryCount = 2
910

1011
db.simulateWorkspaceOutage(seed.seed_workspace_1, {
1112
routes: ['/devices/get'],
1213
})
1314

14-
t.plan(4)
15+
t.plan(expectedRetryCount + 2)
16+
1517
const seam = SeamHttp.fromApiKey(seed.seam_apikey1_token, {
1618
endpoint,
1719
axiosRetryOptions: {
1820
onRetry: (retryCount) => {
19-
t.true(retryCount < 3)
21+
t.true(retryCount <= expectedRetryCount)
2022
},
2123
},
2224
})

0 commit comments

Comments
 (0)