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

daemon: Tests do not clean up after themselves #2125

Closed
rekmarks opened this issue Mar 8, 2024 · 2 comments · Fixed by #2170
Closed

daemon: Tests do not clean up after themselves #2125

rekmarks opened this issue Mar 8, 2024 · 2 comments · Fixed by #2170
Assignees
Labels
bug Something isn't working

Comments

@rekmarks
Copy link
Contributor

rekmarks commented Mar 8, 2024

Tests leave dangling Node processes and temporary files behind, definitively on failure (expected or otherwise), and potentially on success as well. We should rewrite the test suite such that cleanup will always successfully occur.

@rekmarks rekmarks added the bug Something isn't working label Mar 8, 2024
@rekmarks
Copy link
Contributor Author

rekmarks commented Mar 9, 2024

We should try bumping ava to ^6, and potentially making use of some new features. Ref: avajs/ava#3283

@rekmarks
Copy link
Contributor Author

rekmarks commented Mar 18, 2024

I am still observing dangling Node processes on my system after the ava@6 update, after both successful and failed runs. Going to try to fiddle with ava's teardown APIs next.

rekmarks added a commit that referenced this issue Mar 22, 2024
Progresses #2125

Extracts locator setup into utility function and adds test teardown that
will always run, except in cases of multiple locators being created. The
multiple locator case will be handled in a follow-up.

This fully resolves #2125, except in cases where tests that create
multiple locators fail.
rekmarks added a commit that referenced this issue Mar 22, 2024
Progresses #2125

Extracts locator setup into utility function and adds test teardown that
will always run, except in cases of multiple locators being created. The
multiple locator case will be handled in a follow-up.

This fully resolves #2125, except in cases where tests that create
multiple locators fail.
@rekmarks rekmarks self-assigned this Mar 22, 2024
rekmarks added a commit that referenced this issue Mar 22, 2024
Fixes #2125

Refactors `test-endo.js` by introducing utilities to absorb the necessary boilerplate to get from an empty state to a reference to a live endo host. Also addresses #2125 by ensuring that test teardown will always run, even in the case of test failures. There should no longer be any dangling node processes after running `yarn test`, and it may even be possible to forego the use of `test:clean` and its `rm -rf /tmp` prelude in the general case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant