Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion research/ui/test_raster_style_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,17 @@ def test_production_js_native_contract(self):
# The child state at the deadline separates a process that never
# started from one that started and then stalled (#144).
state=checkpoint.read_text(encoding="utf-8") if checkpoint.exists() else "preload checkpoint never written"
started_at=None
try:
started_at=json.loads(state).get("started")
except (ValueError,AttributeError):
started_at=None
# A written checkpoint means Node reached its first JS line, so the
# gap from CreateProcess to that point is the number #144 is about.
delay="" if not isinstance(started_at,(int,float)) else (
f" js_start_after_create_ms={round(time.time()*1000-started_at-spawn_seconds*1000)}")
self.fail(f"node fixture exceeded its ten second limit; {state}; "
f"pid={process.pid} spawn_seconds={spawn_seconds} "
f"pid={process.pid} spawn_seconds={spawn_seconds}{delay} "
f"exit_at_timeout={process.poll()} "
f"partial_stdout_bytes={len(expired.output or '')}")
result=subprocess.CompletedProcess(process.args,process.returncode,stdout,stderr)
Expand Down