Node test limits: 120 s like the other node tests

pytest-windows timed out a sub-second node run of the version-reload test
after 30 s on a busy runner. The remaining node subprocess tests with a
30 s limit get the 120 s the others use, so the limit catches a hang only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUgHR8PXDGer54DH6ie
This commit is contained in:
Claude committed 2026-11-26 12:11:57 +00:00
1 parent 16ddb79377
commit 77a206894f
3 files changed
+7 -4

No files matched your search

+4 -1
View File
@@ -45,8 +45,11 @@ m.setPageVersion({meta});
const results = {json.dumps(host_versions)}.map((v) => m.checkHostVersion(v));
console.log(JSON.stringify({{ reloads, results }}));
"""
# The script takes well under a second; a busy Windows runner has been
# seen to hold a node start for over 30 s (CI of 1.3.303), so the limit
# only catches a hang, as in the other node tests.
out = subprocess.run([node, "--input-type=module", "-e", script], check=True,
capture_output=True, text=True, timeout=30).stdout
capture_output=True, text=True, timeout=120).stdout
return json.loads(out)
+2 -2
View File
@@ -86,7 +86,7 @@ def test_web_twin_slides_edge_labels_apart_too():
"for (const dx of [0, 8, -5, 3]) out.push(f.place(110, 16, around(300 + dx, -900, 110, 16)));"
"console.log(JSON.stringify({out, edge: edgeAnchor(600, 400, 300, -900)}));")
result = subprocess.run([node, "--input-type=module", "-e", script],
capture_output=True, text=True, check=True, timeout=30)
capture_output=True, text=True, check=True, timeout=120)
data = json.loads(result.stdout)
rects = [pygame.Rect(r["x"], r["y"], r["w"], r["h"]) for r in data["out"]]
for a, b in itertools.combinations(rects, 2):
@@ -172,7 +172,7 @@ def test_web_twin_keeps_labels_off_lines_and_remembers_spots():
"const east = beside(200, 150, 60, 14, 90)[0];"
"console.log(JSON.stringify({a, b, east}));")
result = subprocess.run([node, "--input-type=module", "-e", script],
capture_output=True, text=True, check=True, timeout=30)
capture_output=True, text=True, check=True, timeout=120)
data = json.loads(result.stdout)
a = pygame.Rect(data["a"]["x"], data["a"]["y"], data["a"]["w"], data["a"]["h"])
assert not a.inflate(2, 2).clipline((100, 100), (180, 100))
+1 -1
View File
@@ -20,7 +20,7 @@ def _run(script: str) -> dict:
module = (JS / "core" / "map-zoom.js").as_uri()
result = subprocess.run(
[node, "--input-type=module", "-e", f"import * as z from {json.dumps(module)};\n{script}"],
capture_output=True, text=True, timeout=30, check=True)
capture_output=True, text=True, timeout=120, check=True)
return json.loads(result.stdout)