Commit 3e67589
authored
test: use --timeout CLI flag for model-based test timeouts (#367)
## Problem
Several model-based tests using `fast-check` intermittently timeout with
the default 5000ms limit:
- `test/lib/db/model-based.test.ts` — "alias lookup is case-insensitive"
- `test/lib/db/pagination.model-based.test.ts` — "get on empty table
returns undefined", "composite key: different command keys are
independent"
- `test/lib/db/dsn-cache.model-based.test.ts` — "random sequences of
cache operations maintain consistency"
### Root Cause
`bunfig.toml`'s `timeout = 30000` under `[test]` is **not a supported
config key** in Bun 1.3.x — it's silently ignored. All tests were
running with Bun's default 5000ms per-test timeout.
Model-based tests routinely take 5–17s per test due to 50 fast-check
iterations, each creating a new SQLite DB (12 tables + migrations) with
`size: "+1"` generating 10–30+ command sequences.
### Changes
1. **`bunfig.toml`** — Remove non-functional `timeout = 30000`
2. **`package.json`** — Add `--timeout 15000` to `test:unit`,
`test:isolated`, and `test:e2e` scripts
3. **`AGENTS.md`** — Document the bunfig.toml timeout gotcha as a lore
entry
Fixes #3661 parent 80c87b1 commit 3e67589
3 files changed
+45
-50
lines changed
0 commit comments