-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update postgresql testing script #10906
Conversation
- Use sytest:bionic. Sytest:latest is two years old (do we want CI to push out latest at all?) and comes with Python 3.5, which we explictly no longer support. The script now runs under PostgreSQL 10 as a result. A few changes to make it speedier to re-run the tests: - Create blank DB in the container, not the script, so we don't have to `initdb` each time - Use a named volume to persist the tox environment, so we don't have to fetch and install a bunch of packages from PyPI each time
I just tried this with scripts-dev/test_postgresql.sh tests.replication.test_sharded_event_persister.EventPersisterShardTestCase Which took 41 seconds on a re-run. Not bad(?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'm sure this will be useful to many (setting up a postgres locally can be a little bit faffy)
Co-authored-by: reivilibre <[email protected]>
One thing worth thinking about: as a user, how can I instruct the testing to run 20 jobs in parallel? I think we might have an ability to do this with an env var: |
Note that run_pg_tests.sh already has |
ah yes. Slight shame it's not configurable, but don't want to scope creep this if it's not trivial to do |
IDK if this is a good or idiomatic way to do things. Lots of cobbling around searching for hints on the web. Maybe there's some kind of fs middleware that can rewrite uids on the fly? /shrug
Rerunning the script, I get
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for remembering the docs :)
Co-authored-by: reivilibre <[email protected]>
CI to push out latest at all?) and comes with Python 3.5, which we
explictly no longer support. The script now runs under PostgreSQL 10
as a result.
tox
andtrial
so we can run specific test(s) in isolation.A few changes to make it speedier to re-run the tests:
initdb
each timefetch and install a bunch of packages from PyPI each time