summary refs log tree commit diff
path: root/tests/storage/test_purge.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2020-07-31 15:07:01 +0100
committerErik Johnston <erik@matrix.org>2020-07-31 15:07:01 +0100
commitfaba873d4b91cf03c5c2d9546a6df781ce58f2cc (patch)
tree9fca4c5ed30c77c43023d9b365a37ec90261f2b4 /tests/storage/test_purge.py
parentNewsfile (diff)
parentAdd docs for undoing room shutdowns (#7998) (diff)
downloadsynapse-faba873d4b91cf03c5c2d9546a6df781ce58f2cc.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/add_rate_limiting_to_joins
Diffstat (limited to 'tests/storage/test_purge.py')
-rw-r--r--tests/storage/test_purge.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/storage/test_purge.py b/tests/storage/test_purge.py
index b9fafaa1a6..a6012c973d 100644
--- a/tests/storage/test_purge.py
+++ b/tests/storage/test_purge.py
@@ -13,6 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+from twisted.internet import defer
+
 from synapse.rest.client.v1 import room
 
 from tests.unittest import HomeserverTestCase
@@ -49,7 +51,9 @@ class PurgeTests(HomeserverTestCase):
         event = self.successResultOf(event)
 
         # Purge everything before this topological token
-        purge = storage.purge_events.purge_history(self.room_id, event, True)
+        purge = defer.ensureDeferred(
+            storage.purge_events.purge_history(self.room_id, event, True)
+        )
         self.pump()
         self.assertEqual(self.successResultOf(purge), None)
 
@@ -88,7 +92,7 @@ class PurgeTests(HomeserverTestCase):
         )
 
         # Purge everything before this topological token
-        purge = storage.purge_history(self.room_id, event, True)
+        purge = defer.ensureDeferred(storage.purge_history(self.room_id, event, True))
         self.pump()
         f = self.failureResultOf(purge)
         self.assertIn("greater than forward", f.value.args[0])