summary refs log tree commit diff
path: root/tests/storage/test_event_push_actions.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-08-18 18:13:47 +0100
committerRichard van der Hoff <richard@matrix.org>2020-08-18 18:13:47 +0100
commitafe4c4e02e539861e36d6e080f2f5e33bd58f20d (patch)
treeabdef0313e40eec69fbd5d182cbe05fac44d11ed /tests/storage/test_event_push_actions.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentAdd resources.consent conditional dependency back (#8107) (diff)
downloadsynapse-afe4c4e02e539861e36d6e080f2f5e33bd58f20d.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
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