summaryrefslogtreecommitdiff
path: root/tests/servers
diff options
context:
space:
mode:
Diffstat (limited to 'tests/servers')
-rw-r--r--tests/servers/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py
index 4dece98ce9..ea49c11534 100644
--- a/tests/servers/tests.py
+++ b/tests/servers/tests.py
@@ -115,6 +115,7 @@ class LiveServerInMemoryDatabaseLockTest(LiveServerBase):
connection.
"""
conn = self.server_thread.connections_override[DEFAULT_DB_ALIAS]
+ source_connection = conn.connection
# Open a connection to the database.
conn.connect()
# Create a transaction to lock the database.
@@ -128,6 +129,7 @@ class LiveServerInMemoryDatabaseLockTest(LiveServerBase):
finally:
# Release the transaction.
cursor.execute("ROLLBACK")
+ source_connection.close()
class FailingLiveServerThread(LiveServerThread):