Skip to content

Commit 13caea1

Browse files
committed
test(db/postgres): serialise the integration files under vitest 4
The lane's files share one database and schemaMigrations drops its tables mid-suite, so they must run one at a time. That was serialised with poolOptions.forks.singleFork, which vitest 4 removed; the option now silently no-ops and the files ran concurrently, so the drop raced the other suites (relation "repos" does not exist). fileParallelism false is the vitest 4 equivalent.
1 parent 6939f9d commit 13caea1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

vitest.config.integration.postgres.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ export default defineConfig({
2424
hookTimeout: 10000,
2525
setupFiles: ['test/setup-integration-postgres.ts'],
2626
pool: 'forks',
27-
poolOptions: {
28-
forks: {
29-
singleFork: true,
30-
},
31-
},
27+
// The files share one database and some of them drop and recreate its
28+
// tables, so they must not run concurrently. vitest 4 removed the old
29+
// poolOptions.forks.singleFork switch (it silently no-ops), so file
30+
// parallelism is disabled explicitly.
31+
fileParallelism: false,
3232
env: {
3333
NODE_ENV: 'test',
3434
RUN_POSTGRES_TESTS: 'true',

0 commit comments

Comments
 (0)