-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Change test isolation model to 'database per test' (#220)
Improve the reliability and performance of the test suite by moving the test isolation model from 'container per test' to 'database per test'. The current test suite works well locally but is [very flaky ](https://github.com/xataio/pgroll/actions) when run on Github Actions. The cause of the flakiness is the 'container per test' isolation model, under which each testcase in each test starts its own Postgres container. This model worked well initially but as the number of tests has increased the actions runner often fails to make available the required number of containers for such a large number of parallel tests. This PR changes the isolation model to 'database per test'. Each package creates one Postgres container and then each testcase in each test creates a database within that container. This greatly reduces the number of simultaneous containers required, making the test suite faster and more reliable. Each job in the test matrix sees a 60-70% reduction in duration and (anecdotally) far fewer failures with no failures observed in ~20 runs.
- Loading branch information
1 parent
c10dabf
commit f4c37b8
Showing
5 changed files
with
234 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.