summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-10-21 13:10:52 -0400
committerJacob Walls <jacobtylerwalls@gmail.com>2025-10-21 22:54:20 -0400
commitb6c9246d0a3ef5f9a40b15cc289b495351eae109 (patch)
tree332177d06bef9ecd07dee5d85ab0e7f1b770405a /django/test
parent548209e620b3ca34396a360453f07c8dbb8aa6c7 (diff)
Fixed #36677 -- Fixed scheduling of system checks in ParallelTestSuite workers.
Running system checks in workers must happen after database aliases are set up. Regression in 606fc352799e372928fa2c978ab99f0fb6d6017c.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/runner.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index 25089a6db1..41c9dbd10c 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -463,9 +463,6 @@ def _init_worker(
process_setup(*process_setup_args)
django.setup()
setup_test_environment(debug=debug_mode)
- call_command(
- "check", stdout=io.StringIO(), stderr=io.StringIO(), databases=used_aliases
- )
db_aliases = used_aliases if used_aliases is not None else connections
for alias in db_aliases:
@@ -477,6 +474,11 @@ def _init_worker(
connection._test_serialized_contents = value
connection.creation.setup_worker_connection(_worker_id)
+ if is_spawn_or_forkserver:
+ call_command(
+ "check", stdout=io.StringIO(), stderr=io.StringIO(), databases=used_aliases
+ )
+
def _run_subsuite(args):
"""