Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.
diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py
index 78480fc0f8c88..15c2167be4bf3 100644
--- a/django/db/backends/base/creation.py
+++ b/django/db/backends/base/creation.py
@@ -369,3 +369,13 @@ def test_db_signature(self):
             settings_dict["ENGINE"],
             self._get_test_db_name(),
         )
+
+    def setup_worker_connection(self, _worker_id):
+        settings_dict = self.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.
+        self.connection.settings_dict.update(settings_dict)
+        self.mark_expected_failures_and_skips()
+        self.connection.close()
diff --git a/django/test/runner.py b/django/test/runner.py
index 113d5216a6521..aba515e73512c 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):
