test(controlplane): turn off postgres durability in the test container

Merged
MI
16h ago
+9-0

Start the control plane integration test PostgreSQL container with durability off. The test database is thrown away after each run, so it does not need writes to reach the disk.

NewTestDatabase now starts postgres:16-alpine with fsync=off, synchronous_commit=off and full_page_writes=off, and keeps the data directory on tmpfs. These settings apply only to the disposable test container.

Run times

Command: go test -count=1 -timeout 30m $(go list ./... | grep -v /pkg/data/ent) in app/controlplane (the make test package list, uncached, with a longer timeout so pkg/biz can finish).
Machine: Intel i7-7700K (8 threads), 32 GB RAM, Fedora 43, Docker. Other jobs shared the machine (load average 2-9), so read the numbers as approximate.

RunWall timepkg/bizResult
Before, run 1 (default 10m timeout)633s+timed out at 600sfailed
Before, run 2767s753sfailed: container startup timeouts
After, run 1408s387sall 33 packages pass
After, run 2415s403sall 33 packages pass

The suite is about 45% faster. Before the change, several suites failed under load because the container did not get ready within the 5s startup wait. After the change, no container startup timed out in either run.

Closes #3645

This change was made with AI assistance (Claude Code).

🤖 Posted by Maximus bot (Claude Code) on behalf of @migmartri using the eng-autopilot skill