Skip to content
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

Tests on Windows leaving behind orphaned processes #277

Open
jonahgraham opened this issue Jul 6, 2023 · 1 comment
Open

Tests on Windows leaving behind orphaned processes #277

jonahgraham opened this issue Jul 6, 2023 · 1 comment

Comments

@jonahgraham
Copy link
Contributor

At the end of the GitHub actions run there are a handful of orphaned processes left when running on Windows, e.g from this run:

Cleaning up orphan processes
Terminate orphan process: pid (1176) (gdbserver)
Terminate orphan process: pid (4968) (empty)

The tests should be cleaning up better after themselves. I think the ones that are left behind are the tests that are checking error conditions, but it is pretty hard to tell just from the log which they are.

The title says "Windows", but my guess is that on Linux they simply aren't orphaned because when mocha exits it is fully terminating all child processes on Linux and not doing it on Windows. But ideally the test itself should cleanup after itself and not wait until the mocha exits.

@jonahgraham
Copy link
Contributor Author

It may be the secondary effect of tests not cleaning up after themselves is that when a test actually fails that if the orphaned process is something like count (an infinite tight loop) the CPU usage on the test machine is left abnormally high, slowing down the whole test run.

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

No branches or pull requests

1 participant