ckerr

#54945: test: report child process failures from the import/require parity fixture

Merged
Created: Oct 14, 2026, 4:09:41 PM
Merged: Oct 15, 2026, 1:16:03 AM
4 comments
Target: main

Description of Change

The esm "import / require parity" fixture waits for a result from a utility process and from a renderer preload, but nothing watched for those children to fail. If the utility process exited before posting, the preload threw, or the renderer went away, the app waited until spawnAndWait() killed it after 20 seconds. A rejected loadFile() did the same thing, because the main process only warns on unhandled rejections. In each case the spec reported a timeout with empty stdout and no reason.

The fixture now:

  • races each wait against its child's failure: the utility process exit event, and preload-error and render-process-gone for the window.
  • exits with code 2 and the error on stderr when a comparison cannot finish. Codes 0 and 1 still mean every comparison ran, so the spec fails at once with "fixture did not run to completion" and the cause.
  • logs timestamped progress to stderr, so a run that still has to be killed shows which step it was in.

This is not a fix for the recent Windows CI timeouts of this test. Those were host stalls that also slowed unrelated tests on the same machines, and #54901 mitigates them by running the fixture from a retried test instead of a hook. This change makes a real child failure, which would have produced the same opaque timeout, fail at once and name its cause.

The spec, its assertions and its 20 s budget are unchanged; only the fixture changes.

Validated on Linux. With injected failures (utility exits early, preload throws, renderer crashes), the old fixture hangs until the 20 s kill and the new one exits 2 with the cause in 0.2–0.5 s. 100 runs under CPU load all passed. Windows was not run locally.

🤖 Generated with Claude Code

Checklist

Release Notes

Notes: none

Backports

43-x-y
Merged
PR Number
#54996
Merged At
Oct 15, 2026, 3:01:28 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54998
Merged At
Oct 15, 2026, 2:57:47 AM
Released In
Not yet
Release Date
Not yet
45-x-y
In-flight
PR Number
#54999
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron