#54945: test: report child process failures from the import/require parity fixture
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
exitevent, andpreload-errorandrender-process-gonefor 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
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
Backports
Semver Impact
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