summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2023-02-28 16:28:09 +0000
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2023-03-16 11:45:51 +0000
commitd4df71d857059cd51250cc7a222fb08889b60230 (patch)
tree8fb8de4cd203ec61598cafdfddffc9e24cf95fd7
parentNewsfile (diff)
downloadsynapse-d4df71d857059cd51250cc7a222fb08889b60230.tar.xz
(We now kick off refreshing remote profiles from the background, so don't always have something to cancel.)
-rw-r--r--tests/handlers/test_user_directory.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/handlers/test_user_directory.py b/tests/handlers/test_user_directory.py
index da4d240826..872c95ffb0 100644
--- a/tests/handlers/test_user_directory.py
+++ b/tests/handlers/test_user_directory.py
@@ -1128,9 +1128,10 @@ class UserDirectoryRemoteProfileTestCase(unittest.HomeserverTestCase):
         self.user_dir_handler = hs.get_user_directory_handler()
         self.profile_handler = hs.get_profile_handler()
 
-        # Cancel the startup call: in the steady-state case we can't rely on it anyway.
-        assert self.user_dir_handler._refresh_remote_profiles_call_later is not None
-        self.user_dir_handler._refresh_remote_profiles_call_later.cancel()
+        if self.user_dir_handler._refresh_remote_profiles_call_later is not None:
+            # Cancel the startup call: in the steady-state case we can't rely on
+            # it anyway.
+            self.user_dir_handler._refresh_remote_profiles_call_later.cancel()
 
     def test_public_rooms_have_profiles_collected(self) -> None:
         """