mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 21:44:56 -04:00
Don't drop user dir deltas when server leaves room (#10982)
Fix a long-standing bug where a batch of user directory changes would be silently dropped if the server left a room early in the batch. * Pull out `wait_for_background_update` in tests Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
38b7db5885
commit
370bca32e6
11 changed files with 63 additions and 79 deletions
|
@ -103,12 +103,7 @@ class StatsRoomTests(unittest.HomeserverTestCase):
|
|||
# Do the initial population of the stats via the background update
|
||||
self._add_background_updates()
|
||||
|
||||
while not self.get_success(
|
||||
self.store.db_pool.updates.has_completed_background_updates()
|
||||
):
|
||||
self.get_success(
|
||||
self.store.db_pool.updates.do_next_background_update(100), by=0.1
|
||||
)
|
||||
self.wait_for_background_updates()
|
||||
|
||||
def test_initial_room(self):
|
||||
"""
|
||||
|
@ -140,12 +135,7 @@ class StatsRoomTests(unittest.HomeserverTestCase):
|
|||
# Do the initial population of the user directory via the background update
|
||||
self._add_background_updates()
|
||||
|
||||
while not self.get_success(
|
||||
self.store.db_pool.updates.has_completed_background_updates()
|
||||
):
|
||||
self.get_success(
|
||||
self.store.db_pool.updates.do_next_background_update(100), by=0.1
|
||||
)
|
||||
self.wait_for_background_updates()
|
||||
|
||||
r = self.get_success(self.get_all_room_state())
|
||||
|
||||
|
@ -568,12 +558,7 @@ class StatsRoomTests(unittest.HomeserverTestCase):
|
|||
)
|
||||
)
|
||||
|
||||
while not self.get_success(
|
||||
self.store.db_pool.updates.has_completed_background_updates()
|
||||
):
|
||||
self.get_success(
|
||||
self.store.db_pool.updates.do_next_background_update(100), by=0.1
|
||||
)
|
||||
self.wait_for_background_updates()
|
||||
|
||||
r1stats_complete = self._get_current_stats("room", r1)
|
||||
u1stats_complete = self._get_current_stats("user", u1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue