Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
(We now kick off refreshing remote profiles from the background, so d…
Browse files Browse the repository at this point in the history
…on't always have something to cancel.)
  • Loading branch information
reivilibre committed Mar 16, 2023
1 parent fc6c5ae commit d4df71d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/handlers/test_user_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,10 @@ def prepare(self, reactor: MemoryReactor, clock: Clock, hs: HomeServer) -> None:
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:
"""
Expand Down

0 comments on commit d4df71d

Please sign in to comment.