Skip to content

Commit 8750b32

Browse files
Update testing/e2e/src/helpers/fixtures.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent f880a93 commit 8750b32

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

testing/e2e/src/helpers/fixtures.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,12 @@ export const test = base.extend<TestArgs, WorkerArgs>({
5858
return use(async () => {
5959
const authStorageFile = getProjectMetadata('authStorageFile');
6060
// Wait for auth file to exist with timeout
61+
const MAX_WAIT_MS = 30_000;
62+
const POLL_INTERVAL_MS = 200;
63+
const maxAttempts = MAX_WAIT_MS / POLL_INTERVAL_MS;
6164
let attempts = 0;
62-
while (!fs.existsSync(authStorageFile) && attempts < 50) {
63-
await new Promise((resolve) => setTimeout(resolve, 100));
65+
while (!fs.existsSync(authStorageFile) && attempts < maxAttempts) {
66+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
6467
attempts++;
6568
}
6669
if (!fs.existsSync(authStorageFile)) {

0 commit comments

Comments
 (0)