Skip to content

New pool implementation: Timeout terminating forks worker for test files (v4) #8766

@kleinfreund

Description

@kleinfreund

Describe the bug

Following #8649 and the new pool implementation, I start to see short-running tests start to fail due to running longer than the default 5s test timeout with the following errors:

Test failure output:

Error: Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".

After run output:

[vitest-pool]: Timeout terminating forks worker for test files /Users/project/test.spec.ts.
[vitest-pool]: Failed to terminate forks worker for test files /Users/project/test.spec.ts. Error: [vitest-pool-runner]: Timeout waiting for worker to respond
    at Timeout.<anonymous> (file:///Users/project/node_modules/vitest/dist/chunks/cli-api.BjHteKX0.js:6531:58)
    at listOnTimeout (node:internal/timers:608:17)
    at process.processTimers (node:internal/timers:543:7)

Additionally, after this issue occurs, node processes remain active that quickly consume a lot of processing power which results in my laptop's fans to spin loudly (which they almost never do).

Reproduction

https://github.com/kleinfreund/vitest-reproduction/tree/new-pool-implementation

Identical to the reproduction provided in #8649 with a new branch new-pool-implementation that only upgrades vitest from 4.0.0-beta.13 to 4.0.0.

System Info

Binaries:
    Node: 24.9.0 - ~/.local/share/mise/installs/node/24.9.0/bin/node
  npmPackages:
    @vitejs/plugin-vue: 6.0.1 => 6.0.1 
    vite: 7.1.7 => 7.1.7 
    vitest: 4.0.0 => 4.0.0

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions