Skip to content

Commit 6299850

Browse files
committed
fix(test): run integration test files serially under Vitest 5
Vitest 5 projects no longer inherit the root `maxWorkers`, so integration files ran in parallel against the shared cluster and failed with "Cannot create bucket during the bucket deletion" and timeouts. Set `maxWorkers: 1` in the shared integration project config instead.
1 parent b020470 commit 6299850

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎vitest.config.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default defineConfig({
44
test: {
55
projects: ['packages/*/vitest.config.ts', 'tests/*/vitest.config.ts'],
66
pool: 'forks',
7-
maxWorkers: 1,
87
slowTestThreshold: 5_000,
98
sequence: {
109
setupFiles: 'list',

‎vitest.shared.projects.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export default defineProject({
3737
},
3838
},
3939
pool: 'forks',
40+
// Integration specs share one cluster: a file can't create its bucket while another
41+
// one drops its own. Projects don't inherit the root `maxWorkers` since Vitest 5.
42+
maxWorkers: 1,
4043
env: {
4144
CB_CONNECTION_STRING: process.env.CB_CONNECTION_STRING ?? 'couchbase://127.0.0.1',
4245
CB_USER: process.env.CB_USER ?? 'Administrator',

0 commit comments

Comments
 (0)