Skip to content

Commit 9cc7b0e

Browse files
committed
chore(tests): fix retry logic to throw error on last attempt
1 parent 40893d8 commit 9cc7b0e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/canary/canary.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ async function retry(fn, attempts = 3) {
7777
return await fn();
7878
} catch (error) {
7979
if (i === attempts - 1) 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)