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

maxCurrency of zero hangs vitest #6599

Closed
6 tasks done
dcramer opened this issue Sep 30, 2024 · 0 comments · Fixed by #6627
Closed
6 tasks done

maxCurrency of zero hangs vitest #6599

dcramer opened this issue Sep 30, 2024 · 0 comments · Fixed by #6627
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@dcramer
Copy link

dcramer commented Sep 30, 2024

Describe the bug

set maxConcurrency to 0 in vitest's config and it seems to not spin up any workers

This appears to be behavior that was introduced somewhere around vitest 1.5.0. IMO it should either error, or "disable" concurrency (e.g. set it to 1).

Reproduction

import tsconfigPaths from "vite-tsconfig-paths";
import { defineConfig } from "vitest/config";

export default defineConfig({
  plugins: [tsconfigPaths()],
  server: {
    watch: {
      ignored: [
        "**/node_modules/**",
        "**/dist/**",
        "**/postgres-data/**",
      ],
    },
  },
  test: {
    coverage: {
      provider: "v8",
      reporter: ["json"],
    },
    maxConcurrency: 0,
    pool: "forks",
    poolOptions: {
      forks: {
        singleFork: true,
      },
      threads: {
        singleThread: true,
      },
    },
    fileParallelism: false,
    globals: true,
    setupFiles: ["./src/test/setup-test-env.ts"],
    include: ["./src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
    restoreMocks: true,
  },
});

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900KF
    Memory: 27.98 GB / 31.27 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.12.1 - ~/.volta/tools/image/node/20.12.1/bin/node
    Yarn: 3.3.0 - ~/.volta/tools/image/yarn/3.3.0/bin/yarn
    npm: 10.5.0 - ~/.volta/tools/image/node/20.12.1/bin/npm
    pnpm: 9.7.0 - ~/.local/share/pnpm/pnp

Used Package Manager

pnpm

Validations

@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Sep 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 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

Successfully merging a pull request may close this issue.

2 participants