Closed nemesifier closed 8 years ago
Postgresql tweaks to add on the docs:
# /etc/postgresql/9.1/main/postgresql.conf
fsync = off
synchronous_commit = off
full_page_writes = off
django 1.8 --keepdb
option for the test
command, plus the postgresql.conf
optimizations are the real winners.
There are a few other slow tests that will need to be refactored or mocked.
Now is very fast!! :+1:
The entire test suite takes too much time to run.
Possible solutions:
--keep-db
flag: https://docs.djangoproject.com/en/1.8/topics/testing/overview/#id2Ideally each test suite should take less than a couple of minutes to run, while the entire test suite shouldn't take longer than 10 minutes, although now we are quite far from this result!
Useful resources:
UPDATE
I wrote a wrap up here: http://nemesisdesign.net/blog/coding/how-to-speed-up-tests-django-postgresql/