summary refs log tree commit diff
path: root/tests/storage/test_event_push_actions.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-10-19 18:34:31 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2020-10-19 18:34:31 +0100
commit25b077d747cbac85c08b0cc416df0f0e6202921a (patch)
treed011aa68a1e93095810f1a81055ae6c2a0527858 /tests/storage/test_event_push_actions.py
parentMerge commit 'e04e465b4' into anoa/dinsic_release_1_21_x (diff)
parentConvert some of the general database methods to async (#8100) (diff)
downloadsynapse-25b077d747cbac85c08b0cc416df0f0e6202921a.tar.xz
Merge commit '050e20e7c' into anoa/dinsic_release_1_21_x
* commit '050e20e7c':
  Convert some of the general database methods to async (#8100)
Diffstat (limited to 'tests/storage/test_event_push_actions.py')
-rw-r--r--tests/storage/test_event_push_actions.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/storage/test_event_push_actions.py b/tests/storage/test_event_push_actions.py

index 857db071d4..238bad5b45 100644 --- a/tests/storage/test_event_push_actions.py +++ b/tests/storage/test_event_push_actions.py
@@ -142,20 +142,22 @@ class EventPushActionsStoreTestCase(tests.unittest.TestCase): @defer.inlineCallbacks def test_find_first_stream_ordering_after_ts(self): def add_event(so, ts): - return self.store.db_pool.simple_insert( - "events", - { - "stream_ordering": so, - "received_ts": ts, - "event_id": "event%i" % so, - "type": "", - "room_id": "", - "content": "", - "processed": True, - "outlier": False, - "topological_ordering": 0, - "depth": 0, - }, + return defer.ensureDeferred( + self.store.db_pool.simple_insert( + "events", + { + "stream_ordering": so, + "received_ts": ts, + "event_id": "event%i" % so, + "type": "", + "room_id": "", + "content": "", + "processed": True, + "outlier": False, + "topological_ordering": 0, + "depth": 0, + }, + ) ) # start with the base case where there are no events in the table