3 ms·
We apply the overall same strategy (individual DB for each test created from a template). Our whole test suite (integration + unit tests) takes ~80 seconds to
by kakwa_ 4y ago
We apply the overall same strategy (individual DB for each test created from a template).
Our whole test suite (integration + unit tests) takes ~80 seconds to run for ~800 integration tests (each with their own DB) and 300 unit tests. And that's on my dev laptop (T14s, cpu: i7-1185G7) without much optimization (mainly fsync = off in postgresql.conf).
In fact, I just ran a quick test, and just putting the DB on a tmpfs cuts that time to ~40 seconds.
So overall 0.1 to 0.05 second per test on average, same ballpark as parent (and it's kind of an over estimation actually since we have a dozen or so of slow tests taking 5 to 10 seconds).
Note that the tests are run in parallel however.