Skip to content

Keep test worker alive until explicitly freed #3391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

matz3
Copy link
Contributor

@matz3 matz3 commented Jul 10, 2025

This change ensures that all messages from the worker are received by the main process before the worker exits.

It solves issues on Windows that are occurring with Node.js v20 and later when workerThreads: false is set in the AVA configuration.

Fixes: #3390

@matz3 matz3 force-pushed the fix-failing-with-remaining-tests-on-windows branch from e903735 to 1dbae79 Compare July 10, 2025 18:10
This change ensures that all messages from the worker are received by
the main process before the worker exits.

It solves issues on Windows that are occurring with Node.js v20 and later
when `workerThreads: false` is set in the AVA configuration.

Fixes: avajs#3390
@matz3 matz3 force-pushed the fix-failing-with-remaining-tests-on-windows branch from 1dbae79 to 68d14e4 Compare July 10, 2025 18:12
Whether the worker exits depends on whether user code is keeping the event loop busy. 'Freed' is a better term.
@novemberborn novemberborn changed the title fix: Failing with remaining tests (Windows) Keep test worker alive until explicitly freed Jul 12, 2025
@novemberborn novemberborn merged commit b99b703 into avajs:main Jul 12, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AVA finishes prematurely on Windows, failing with remaining tests
2 participants