Closed peralta closed 1 month ago
Hey there, @peralta! I'm Dosu, a bot designed to help you with bug fixes, questions, and becoming a contributor. I'm here to assist you while waiting for a human maintainer. Let's squash those bugs together! 🤖
The issue you're experiencing with the server process not being killed after upgrading to Nuxt v3.13.2 is indeed related to the introduction of tinyexec
in test-utils
. The tinyexec
implementation is not properly handling the termination of processes, which causes the server process to linger and subsequent tests to fail due to the address being in use.
In the startServer
function, tinyexec
is used to start the server process, but if the server is not properly stopped using the stopServer
function, which calls ctx.serverProcess.kill()
, the process remains running. This issue likely stems from tinyexec
not correctly handling the termination of the server process [1][2].
Downgrading to test-utils
v3.13.1, which uses execa
instead of tinyexec
, resolves the issue because execa
handles process termination more reliably. You can follow the discussion and potential fixes in the related pull request here.
To continue talking to Dosu, mention @dosu.
False positive
Environment
Reproduction
After upgrading nuxt v3.13.2 from v3.13.1, which triggered the dependency update from test-utils to the same version, the first test node server process is not killed. Following tests fail because address is already in use.
Describe the bug
Downgrading test-utils to v3.13.1 fixes the issue. Probably related to the tinyexec PR: https://github.com/nuxt/test-utils/pull/939
Additional context
No response
Logs
No response