Skip to content

Vitest hangs if poolRunner.start throws an error #9271

@sheremet-va

Description

@sheremet-va

Describe the bug

If anything inside poolRunner.start throws an error, then Vitest hangs indefinitely. I've noticed that when trying to run the reproduction as a test via runInlineTests, it passes, but when running in an actual terminal, it hangs the terminal.

I've noticed that:

  • Worker is not stopped
  • Pool.prototype.activeTasks still has the task

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-byqm9r5n?file=vite.config.ts,env.js&initialPath=__vitest__/

System Info

Any

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

Labels

p3-minor-bugAn edge case that only affects very specific usage (priority)

Type

Projects

Status

Approved

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions