mirror of
https://github.com/google/nomulus
synced 2026-09-29 19:25:50 +00:00
- Mount the test Postgres data directory on an in-memory tmpfs and disable fsync, synchronous_commit, and full_page_writes for ephemeral test containers. - Override the Nomulus SQL dialect to emit 'deferrable initially deferred' on foreign keys exported by HibernateSchemaExporter. This matches prod. - Replace per-test TRUNCATES (etc) with DELETEs -- the vast majority of tests only change a couple tables and DELETEing a few rows is much faster than having to reallocate all the disk space for each and every table every time - Cache the connection to Postgres that we use for resetting data, instead of having to re-create it each time - Add a test for child entity foreign key generation This drastically speeds up tests, cutting out like 30-40% of total test time (not including compilation) (we also update a couple queries to be deterministically ordered to avoid test flakes)