Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Feb 20, 2025

Backport of #45690

See that PR for details.

Notes: none

This fixture has been calling process.exit() immediately after writing
to stdout and stderr, which the Node.js docs say is risky behavior:

> Calling process.exit() will force the process to exit as quickly as
> possible even if there are still asynchronous operations pending that
> have not yet completed fully, including I/O operations to
> process.stdout and process.stderr.

This fixture's been around for years without problems (AFAIK).
The writes are very small ('hello\n' and 'world') and finish quickly.
But recently I've been testing on a very slow CI machine. There, I see
this spec flaking when it expects stderr to be 'world' but it gets ''.

This PR changes the fixture to wait for stdout & stderr to flush
before calling process.exit().

Co-authored-by: Charles Kerr <charles@charleskerr.com>
@trop trop bot requested review from a team and ckerr February 20, 2025 05:28
@trop trop bot added 33-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Feb 20, 2025
@codebytere codebytere merged commit 29ec38d into 33-x-y Feb 20, 2025
60 of 61 checks passed
@codebytere codebytere deleted the trop/33-x-y-bp-fix-possible-timing-issue-in-utility-process-spec-1740029295144 branch February 20, 2025 11:51
@release-clerk
Copy link

release-clerk bot commented Feb 20, 2025

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

33-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.