diff options
author | Erik Johnston <erik@matrix.org> | 2020-05-22 14:21:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 14:21:54 +0100 |
commit | 1531b214fc57714c14046a8f66c7b5fe5ec5dcdd (patch) | |
tree | fd150f21a14dcc6f5cf3f373984478dd12d43c95 /tests/handlers/test_typing.py | |
parent | Convert sending mail to async/await. (#7557) (diff) | |
download | synapse-1531b214fc57714c14046a8f66c7b5fe5ec5dcdd.tar.xz |
Add ability to wait for replication streams (#7542)
The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
Diffstat (limited to 'tests/handlers/test_typing.py')
-rw-r--r-- | tests/handlers/test_typing.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/handlers/test_typing.py b/tests/handlers/test_typing.py index 51e2b37218..2fa8d4739b 100644 --- a/tests/handlers/test_typing.py +++ b/tests/handlers/test_typing.py @@ -86,7 +86,10 @@ class TypingNotificationsTestCase(unittest.HomeserverTestCase): reactor.pump((1000,)) hs = self.setup_test_homeserver( - notifier=Mock(), http_client=mock_federation_client, keyring=mock_keyring + notifier=Mock(), + http_client=mock_federation_client, + keyring=mock_keyring, + replication_streams={}, ) hs.datastores = datastores |