We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f880a93 commit 8750b32Copy full SHA for 8750b32
1 file changed
testing/e2e/src/helpers/fixtures.ts
@@ -58,9 +58,12 @@ export const test = base.extend<TestArgs, WorkerArgs>({
58
return use(async () => {
59
const authStorageFile = getProjectMetadata('authStorageFile');
60
// 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;
64
let attempts = 0;
- while (!fs.existsSync(authStorageFile) && attempts < 50) {
- await new Promise((resolve) => setTimeout(resolve, 100));
65
+ while (!fs.existsSync(authStorageFile) && attempts < maxAttempts) {
66
+ await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
67
attempts++;
68
}
69
if (!fs.existsSync(authStorageFile)) {
0 commit comments