diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 030d2f28dd..0093fefd21 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1488,6 +1488,22 @@ subsequent run. Unless the :setting:`MIGRATE ` test setting is ``False``, any unapplied migrations will also be applied to the test database before running the test suite. +.. warning:: + + When using ``--keepdb`` with :option:`test --parallel`, new migrations + are not automatically applied to clone databases (e.g., ``test_1``, + ``test_2``). + + While migrations are applied to the main test database, clones retain + their existing schema. This can cause test failures with errors such as + "column does not exist" or "relation does not exist" after adding + migrations. + + To avoid this, either omit ``--keepdb`` when you have schema changes, + or manually delete the clone databases before running tests. + + This is a known limitation. See :ticket:`26822` for details. + .. django-admin-option:: --shuffle [SEED] Randomizes the order of tests before running them. This can help detect tests diff --git a/docs/topics/testing/overview.txt b/docs/topics/testing/overview.txt index 8ec1652ba3..3cf174c4d8 100644 --- a/docs/topics/testing/overview.txt +++ b/docs/topics/testing/overview.txt @@ -359,6 +359,9 @@ Running tests in parallel As long as your tests are properly isolated, you can run them in parallel to gain a speed up on multi-core hardware. See :option:`test --parallel`. +See :option:`test --keepdb` for a known limitation when combining these options +(:ticket:`26822`). + Password hashing ~~~~~~~~~~~~~~~~