diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2020-08-27 11:39:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 11:39:53 +0100 |
commit | a466b6797219203cbf539c5c0bbdfe8ab5a41fa4 (patch) | |
tree | ba1e9d45f331fb19ab15d479ec6ef06fc23633d3 /tests/storage | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-a466b6797219203cbf539c5c0bbdfe8ab5a41fa4.tar.xz |
Reduce run-times of tests by advancing the reactor less (#7757)
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test_cleanup_extrems.py | 2 | ||||
-rw-r--r-- | tests/storage/test_roommember.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/storage/test_cleanup_extrems.py b/tests/storage/test_cleanup_extrems.py index 43639ca286..080761d1d2 100644 --- a/tests/storage/test_cleanup_extrems.py +++ b/tests/storage/test_cleanup_extrems.py @@ -271,7 +271,7 @@ class CleanupExtremDummyEventsTestCase(HomeserverTestCase): # Pump the reactor repeatedly so that the background updates have a # chance to run. - self.pump(10 * 60) + self.pump(20) latest_event_ids = self.get_success( self.store.get_latest_event_ids_in_room(self.room_id) diff --git a/tests/storage/test_roommember.py b/tests/storage/test_roommember.py index d98fe8754d..12ccc1f53e 100644 --- a/tests/storage/test_roommember.py +++ b/tests/storage/test_roommember.py @@ -87,7 +87,7 @@ class RoomMemberStoreTestCase(unittest.HomeserverTestCase): self.inject_room_member(self.room, self.u_bob, Membership.JOIN) self.inject_room_member(self.room, self.u_charlie.to_string(), Membership.JOIN) - self.pump(20) + self.pump() self.assertTrue("_known_servers_count" not in self.store.__dict__.keys()) @@ -101,7 +101,7 @@ class RoomMemberStoreTestCase(unittest.HomeserverTestCase): # Initialises to 1 -- itself self.assertEqual(self.store._known_servers_count, 1) - self.pump(20) + self.pump() # No rooms have been joined, so technically the SQL returns 0, but it # will still say it knows about itself. @@ -111,7 +111,7 @@ class RoomMemberStoreTestCase(unittest.HomeserverTestCase): self.inject_room_member(self.room, self.u_bob, Membership.JOIN) self.inject_room_member(self.room, self.u_charlie.to_string(), Membership.JOIN) - self.pump(20) + self.pump(1) # It now knows about Charlie's server. self.assertEqual(self.store._known_servers_count, 2) |