Closed cuducos closed 6 years ago
Hi @cuducos can you solve the conflicts? Then I'll test it!
Done.
What I did to test this PR:
Clone Jarbas:
$ git clone git@github.com:datasciencebr/jarbas.git
Open Jarbas' folder:
$ cd jarbas
Change to @cuducos branch:
$ git fetch origin
$ git checkout -b cuducos-parallel-tests origin/cuducos-parallel-tests
$ git merge master
Run its tests:
$ docker-compose up -d
$ docker-compose run --rm django python manage.py migrate
$ docker-compose run --rm django python manage.py test --parallel (not applied)
Result:
It seems that it is not resolving postgres:
django.db.utils.OperationalError: could not translate host name "postgres" to address: Name does not resolve
I'm afraid this error has nothing to do with this PR. You might want to re-do the same steps with the master
branch and open an issue related to PostgreSQL and Docker setup.
Thanks @cuducos, I'll try to check what is happening in the master branch.
Everything seems to be working on master, I'll test this PR again.
Nice! By applying docker-compose run --rm django python manage.py test --parallel
the result is:
➜ jarbas git:(cuducos-parallel-tests) docker-compose run --rm django python manage.py test --parallel
Starting jarbas_queue_1 ...
Starting jarbas_queue_1 ... done
Starting jarbas_postgres_1 ... done
Starting jarbas_tasks_1 ... done
Creating test database for alias 'default'...
Cloning test database for alias 'default'...
Cloning test database for alias 'default'...
System check identified no issues (0 silenced).
..........................................................................................................................................................................
----------------------------------------------------------------------
Ran 170 tests in 3.703s
OK
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Destroying test database for alias 'default'...
Works fine, merging it
What is the purpose of this Pull Request? Make tests run quicker.
What was done to achieve this purpose? Added
--parallel
argument to docs and.travis.yml
as well as a lib to fix traceback when using this option.How to test if it really works? Only only in UNIX based systems (sorry, according to Django
--parallel
argument is not compatible with Windows): Copy and paste the test command from theREADME.md
and compare to the time taken without the added argument.For example:
The first result is what we have today, the second is with multiple tests running in parallel.
Who can help reviewing it? @anaschwendler