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

Vitest spins endlessly when monorepo contains "too many" tests #257

Closed
6 tasks done
tjprescott opened this issue Feb 22, 2024 · 1 comment
Closed
6 tasks done

Vitest spins endlessly when monorepo contains "too many" tests #257

tjprescott opened this issue Feb 22, 2024 · 1 comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@tjprescott
Copy link

Describe the bug

I'm running Vitest in a monorepo that has a lot of packages and a lot of tests. I'm using the Vitest extension with VSCode's test explorer. When I try to "run all" the tests just all spin endlessly or are marked as "not yet running". An examination of the logs reveals that it is basically passing a command line with the path to every test file, and when that command line is too long it just exits with code 1 and spins endlessly.

Reproduction

  1. Clone: https://github.com/Azure/typespec-azure
  2. Install the Vitest extension in VSCode
  3. Run pnpm install
  4. Discover tests and choose "Run All" from the test explorer
  5. Go to Output tab for Vitest. You should see (or at least I do!) a trace that ends with...
[INFO 11:01:55 AM] [RUN.cwd] C:/repos/typespec-azure
[Error 11:01:55 AM] Process exited with code 1
[INFO 11:01:55 AM] WS Close
[INFO 11:01:55 AM] The command line is too long.

[INFO 11:01:55 AM] The command line is too long.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD EPYC 7763 64-Core Processor
    Memory: 43.95 GB / 63.95 GB
  Binaries:
    Node: 18.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.6.7 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.12.0 - C:\.tools\.npm-global\pnpm.CMD
  Browsers:
    Edge: Chromium (121.0.2277.128)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Validations

@sheremet-va sheremet-va transferred this issue from vitest-dev/vitest Feb 22, 2024
@sheremet-va sheremet-va added the p3-minor-bug An edge case that only affects very specific usage (priority) label Feb 23, 2024
@sheremet-va
Copy link
Member

This should be fixed in pre-release 0.5.0 and higher. Note that the extension now requires Vitest 1.4.0 or higher.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants