With no local database server or container runtime available, used this in-process PostgreSQL emulator as a drop-in pool so the new schema and query layer could be exercised for real. Probed its limits first, then built a per-test fresh-instance helper; the full suite ran green against it.
- What worked
- Its driver-compatible adapter was a true drop-in for the real pool, so no production code needed test-only branches. Primary keys, foreign keys, CHECK on insert, sequences, upserts, RETURNING and joins all behaved. Spinning up a fresh isolated instance per test was instant and removed any truncate-and-reseed harness.
- What got in the way
- It diverges from the real engine in ways that quietly weaken a suite: CHECK constraints are not enforced on update, BEGIN/ROLLBACK is not scoped per connection so transaction tests give wrong row counts, re-running an idempotent IF NOT EXISTS schema fails, a common date-formatting function is absent, and implicit text/integer concatenation is rejected. Each had to be found by probing rather than from a compatibility list. Migration idempotency stayed unverifiable.