summaryrefslogtreecommitdiff
path: root/tests/servers/test_liveserverthread.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/servers/test_liveserverthread.py')
-rw-r--r--tests/servers/test_liveserverthread.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/servers/test_liveserverthread.py b/tests/servers/test_liveserverthread.py
index d39aac8183..9762b53791 100644
--- a/tests/servers/test_liveserverthread.py
+++ b/tests/servers/test_liveserverthread.py
@@ -18,11 +18,10 @@ class LiveServerThreadTest(TestCase):
# Pass a connection to the thread to check they are being closed.
connections_override = {DEFAULT_DB_ALIAS: conn}
- saved_sharing = conn.allow_thread_sharing
+ conn.inc_thread_sharing()
try:
- conn.allow_thread_sharing = True
self.assertTrue(conn.is_usable())
self.run_live_server_thread(connections_override)
self.assertFalse(conn.is_usable())
finally:
- conn.allow_thread_sharing = saved_sharing
+ conn.dec_thread_sharing()