Skip to content

Commit 444baad

Browse files
committed
Expanding timeout, fixing retry interval
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 0843a8f commit 444baad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

site/e2e/helpers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,15 +699,16 @@ export const createServer = async (
699699
async function waitForPort(
700700
port: number,
701701
host = "0.0.0.0",
702-
timeout = 5000,
702+
timeout = 30000,
703703
): Promise<void> {
704704
const start = Date.now();
705705
while (Date.now() - start < timeout) {
706706
const available = await isPortAvailable(port, host);
707707
if (available) {
708708
return;
709709
}
710-
await new Promise((resolve) => setTimeout(resolve, 100)); // Wait 1 second before retrying
710+
console.warn(`${host}:${port} is in use, checking again in 1s`)
711+
await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait 1 second before retrying
711712
}
712713
throw new Error(
713714
`Timeout: port ${port} is still in use after ${timeout / 1000} seconds.`,

0 commit comments

Comments
 (0)