summaryrefslogtreecommitdiff
path: root/django/test
diff options
context:
space:
mode:
authorbaldychristophe <baldychristophe@gmail.com>2022-11-18 18:26:59 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-11-24 10:52:48 +0100
commit855f5a36e7c8e7a8ce3f62d6ef8c9ae3e073ae3d (patch)
treea991c947067edc1fcfd7d23fa9a49cf8d5ca8f19 /django/test
parent1297c0d0d76a708017fe196b61a0ab324df76954 (diff)
Fixed #29062 -- Prevented possibility of database lock when using LiveServerTestCase with in-memory SQLite database.
Thanks Chris Jerdonek for the implementation idea.
Diffstat (limited to 'django/test')
-rw-r--r--django/test/testcases.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py
index a9349d82f1..c78c2300a7 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -1778,7 +1778,9 @@ class LiveServerThread(threading.Thread):
try:
# Create the handler for serving static and media files
handler = self.static_handler(_MediaFilesHandler(WSGIHandler()))
- self.httpd = self._create_server()
+ self.httpd = self._create_server(
+ connections_override=self.connections_override,
+ )
# If binding to port zero, assign the port allocated by the OS.
if self.port == 0:
self.port = self.httpd.server_address[1]