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/test_federation.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 '')
-rw-r--r-- | tests/test_federation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py index 13ff14863e..c5099dd039 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -28,13 +28,13 @@ class MessageAcceptTests(unittest.HomeserverTestCase): user_id = UserID("us", "test") our_user = Requester(user_id, None, False, None, None) room_creator = self.homeserver.get_room_creation_handler() - room = ensureDeferred( + room_deferred = ensureDeferred( room_creator.create_room( our_user, room_creator.PRESETS_DICT["public_chat"], ratelimit=False ) ) self.reactor.advance(0.1) - self.room_id = self.successResultOf(room)["room_id"] + self.room_id = self.successResultOf(room_deferred)[0]["room_id"] self.store = self.homeserver.get_datastore() |