summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorValz <ahmadahussein0@gmail.com>2022-02-23 11:34:22 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-23 11:35:46 +0100
commitae91ecf6a1037fb67d14841b66ac19d4c2ccc4ac (patch)
treef3aed632123377904fb8a511e8b4b2ecf1dea3b5 /django/test
parenteabc22f919e6c1774842e628400b87ac56c47bce (diff)
Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/runner.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index 113d5216a6..aba515e735 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -407,13 +407,7 @@ def _init_worker(counter):
for alias in connections:
connection = connections[alias]
- settings_dict = connection.creation.get_test_db_clone_settings(str(_worker_id))
- # connection.settings_dict must be updated in place for changes to be
- # reflected in django.db.connections. If the following line assigned
- # connection.settings_dict = settings_dict, new threads would connect
- # to the default database instead of the appropriate clone.
- connection.settings_dict.update(settings_dict)
- connection.close()
+ connection.creation.setup_worker_connection(_worker_id)
def _run_subsuite(args):