-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(pool): prevent writing to closed worker #9023
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
Conversation
@vitest/browser
@vitest/browser-playwright
@vitest/browser-preview
@vitest/browser-webdriverio
@vitest/coverage-istanbul
@vitest/coverage-v8
@vitest/expect
@vitest/mocker
@vitest/pretty-format
@vitest/runner
@vitest/snapshot
@vitest/spy
@vitest/ui
@vitest/utils
vitest
@vitest/web-worker
@vitest/ws-client
commit: |
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: axel7083 <[email protected]>
ref vitest-dev/vitest#9023 (comment) Signed-off-by: axel7083 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! So glad to see you working on this issue, we are in the middle of our migration to vitest 4. We have an almost 100% reproducer on GitHub, (not reproducing locally however) if you need to experiment let me know I could try to help
I also tried to downgrade to 4.0.4 but the problem still persist unit tests / ubuntu-24.04#job
739dd30 to
0f9e498
Compare
0f9e498 to
617260f
Compare
Description
Resolves #9014
When user's test case doesn't do proper clean up, it can trigger rpc calls after test finished. In the reproduction there's
rpc.fetch()that resolves on main thread after worker has stopped. This leads toEPIPEas IPC is closed already.This is reproducible by having Vite plugin that takes long time on specific file transform, and that file is imported without awaiting it in test case.
Minimal repro for
test/core- this will raiseError: [vitest-worker]: Closing rpc while "fetch" was pendingerrors on worker side so not adding the test case for now:Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yamlunless you introduce a new test example.Tests
pnpm test:ci.Documentation
pnpm run docscommand.Changesets
feat:,fix:,perf:,docs:, orchore:.