Commit ff664d0
fix(server): serialize Postgres-backed test files to stop real deadlocks
The postgres-*.test.ts suites all run against one shared Postgres
instance (CI's real service container). vitest's default file-level
parallelism runs these files concurrently across worker processes,
which is exactly what produced the deadlocks (AccessExclusiveLock/
RowShareLock contention) and foreign-key violations the first real
Postgres-backed CI run just surfaced -- these suites never ran against
real Postgres in CI before today. Set fileParallelism: false so they
serialize instead; correctness over wall-clock time is the right trade
for integration tests against genuinely shared, unpartitioned state.
Not independently verifiable here (no local Postgres/Redis in this
environment) -- the non-Postgres suite (647 tests) still passes
unchanged with this config.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 082f877 commit ff664d0
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
0 commit comments