diff --git a/tests/playwright-asyncify.config.ts b/tests/playwright-asyncify.config.ts index 5093bf3..0664dee 100644 --- a/tests/playwright-asyncify.config.ts +++ b/tests/playwright-asyncify.config.ts @@ -13,7 +13,7 @@ function findFreePort(): number { try { const result = execSync( 'python3 -c "import socket; s=socket.socket(); s.bind((\'\',0)); print(s.getsockname()[1]); s.close()"', - { encoding: 'utf-8' } + { encoding: 'utf-8', timeout: 5000 } ); return parseInt(result.trim()); } catch { diff --git a/tests/playwright-coroutine.config.ts b/tests/playwright-coroutine.config.ts index 416b6f5..5f72841 100644 --- a/tests/playwright-coroutine.config.ts +++ b/tests/playwright-coroutine.config.ts @@ -15,7 +15,7 @@ function findFreePort(): number { try { const result = execSync( 'python3 -c "import socket; s=socket.socket(); s.bind((\'\',0)); print(s.getsockname()[1]); s.close()"', - { encoding: 'utf-8' } + { encoding: 'utf-8', timeout: 5000 } ); return parseInt(result.trim()); } catch { diff --git a/tests/playwright-kicad.config.ts b/tests/playwright-kicad.config.ts index 12435d7..0e76142 100644 --- a/tests/playwright-kicad.config.ts +++ b/tests/playwright-kicad.config.ts @@ -52,7 +52,7 @@ function findFreePort(): number { try { const result = execSync( "python3 -c \"import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()\"", - { encoding: "utf-8" } + { encoding: "utf-8", timeout: 5000 } ); return parseInt(result.trim()); } catch { diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts index 68b3dd3..947528b 100644 --- a/tests/playwright.config.ts +++ b/tests/playwright.config.ts @@ -51,7 +51,9 @@ function findFreePort(): number { try { const result = execSync( 'python3 -c "import socket; s=socket.socket(); s.bind((\'\',0)); print(s.getsockname()[1]); s.close()"', - { encoding: 'utf-8' } + // timeout: a broken python3 must fall back to the random port below, not + // hang the whole run at config-load time. + { encoding: 'utf-8', timeout: 5000 } ); return parseInt(result.trim()); } catch {