diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2011-12-30 20:34:07 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2011-12-30 20:34:07 +0000 |
| commit | ffb0519d44dbf6254f0c0600397d901d207be839 (patch) | |
| tree | b5997a6b7fe25b7853000ac8e8d2b729db4fe6d3 /docs | |
| parent | 32ee74f89edd88fb37ca223b1e146eebe8fb6c1b (diff) | |
Edited testing.txt changes from [17289]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/testing.txt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index 5eef2dc092..ea2c52b097 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -1781,8 +1781,7 @@ via the :djadminopt:`--liveserver` option, for example: Another way of changing the default server address is by setting the `DJANGO_LIVE_TEST_SERVER_ADDRESS` environment variable somewhere in your -code (for example in a :ref:`custom test runner<topics-testing-test_runner>` -if you're using one): +code (for example, in a :ref:`custom test runner<topics-testing-test_runner>`): .. code-block:: python @@ -1790,18 +1789,18 @@ if you're using one): os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = 'localhost:8082' In the case where the tests are run by multiple processes in parallel (for -example in the context of several simultaneous `continuous integration`_ -builds), the processes will compete for the same address and therefore your +example, in the context of several simultaneous `continuous integration`_ +builds), the processes will compete for the same address, and therefore your tests might randomly fail with an "Address already in use" error. To avoid this problem, you can pass a comma-separated list of ports or ranges of ports (at -least as many as the number of potential parallel processes), for example: +least as many as the number of potential parallel processes). For example: .. code-block:: bash ./manage.py test --liveserver=localhost:8082,8090-8100,9000-9200,7041 -Then, during the execution of the tests, each new live test server will try -every specified port until it finds one that is free and takes it. +Then, during test execution, each new live test server will try every specified +port until it finds one that is free and takes it. .. _continuous integration: http://en.wikipedia.org/wiki/Continuous_integration |
