diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-27 12:21:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-27 12:21:34 -0400 |
commit | 8144bc26a7432463b7e70f9c03198d4724952522 (patch) | |
tree | a678eeec472c27e168dae14648e3ce269ff77377 /tests | |
parent | update changelog (diff) | |
download | synapse-8144bc26a7432463b7e70f9c03198d4724952522.tar.xz |
Convert push to async/await. (#7948)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/replication/slave/storage/test_events.py | 6 | ||||
-rw-r--r-- | tests/storage/test_event_push_actions.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/replication/slave/storage/test_events.py b/tests/replication/slave/storage/test_events.py index 1a88c7fb80..0b5204654c 100644 --- a/tests/replication/slave/storage/test_events.py +++ b/tests/replication/slave/storage/test_events.py @@ -366,7 +366,9 @@ class SlavedEventStoreTestCase(BaseSlavedStoreTestCase): state_handler = self.hs.get_state_handler() context = self.get_success(state_handler.compute_event_context(event)) - self.master_store.add_push_actions_to_staging( - event.event_id, {user_id: actions for user_id, actions in push_actions} + self.get_success( + self.master_store.add_push_actions_to_staging( + event.event_id, {user_id: actions for user_id, actions in push_actions} + ) ) return event, context diff --git a/tests/storage/test_event_push_actions.py b/tests/storage/test_event_push_actions.py index b45bc9c115..43dbeb42c5 100644 --- a/tests/storage/test_event_push_actions.py +++ b/tests/storage/test_event_push_actions.py @@ -72,8 +72,10 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase): event.internal_metadata.stream_ordering = stream event.depth = stream - yield self.store.add_push_actions_to_staging( - event.event_id, {user_id: action} + yield defer.ensureDeferred( + self.store.add_push_actions_to_staging( + event.event_id, {user_id: action} + ) ) yield self.store.db.runInteraction( "", |