Skip to content

Commit fc8e75a

Browse files
committed
chore(tests): log retry attempts
1 parent 40893d8 commit fc8e75a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/canary/canary.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ async function retry(fn, attempts = 3) {
7676
try {
7777
return await fn();
7878
} catch (error) {
79-
if (i === attempts - 1) throw error;
79+
if (i === attempts) throw error;
80+
console.log(`Retry ${i + 1}/${attempts} failed, retrying...`);
8081
await new Promise((resolve) => setTimeout(resolve, 2000));
8182
}
8283
}

0 commit comments

Comments
 (0)