summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2023-08-30 14:18:42 +0100
committerGitHub <noreply@github.com>2023-08-30 14:18:42 +0100
commita2e0d4cd6024462f0067c56f83c2fe5b67da2109 (patch)
tree72d3d05c778b11ec08b3533df51a5d33bf5122c8 /tests/storage
parentMerge branch 'master' into develop (diff)
downloadsynapse-a2e0d4cd6024462f0067c56f83c2fe5b67da2109.tar.xz
Fix rare bug that broke looping calls (#16210)
* Fix rare bug that broke looping calls

We can't interact with the reactor from the main thread via looping
call.

Introduced in v1.90.0 / #15791.

* Newsfile
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/databases/main/test_lock.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/storage/databases/main/test_lock.py b/tests/storage/databases/main/test_lock.py
index f541f1d6be..650b4941ba 100644
--- a/tests/storage/databases/main/test_lock.py
+++ b/tests/storage/databases/main/test_lock.py
@@ -132,6 +132,7 @@ class LockTestCase(unittest.HomeserverTestCase):
 
         # We simulate the process getting stuck by cancelling the looping call
         # that keeps the lock active.
+        assert lock._looping_call
         lock._looping_call.stop()
 
         # Wait for the lock to timeout.
@@ -403,6 +404,7 @@ class ReadWriteLockTestCase(unittest.HomeserverTestCase):
 
         # We simulate the process getting stuck by cancelling the looping call
         # that keeps the lock active.
+        assert lock._looping_call
         lock._looping_call.stop()
 
         # Wait for the lock to timeout.