mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 12:53:12 -05:00
Convert additional database methods to async (select list, search, insert_many, delete_*) (#8168)
This commit is contained in:
parent
4a739c73b4
commit
30426c7063
8 changed files with 67 additions and 84 deletions
|
|
@ -67,13 +67,12 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# second step: complete the update
|
||||
# we should now get run with a much bigger number of items to update
|
||||
@defer.inlineCallbacks
|
||||
def update(progress, count):
|
||||
async def update(progress, count):
|
||||
self.assertEqual(progress, {"my_key": 2})
|
||||
self.assertAlmostEqual(
|
||||
count, target_background_update_duration_ms / duration_ms, places=0,
|
||||
)
|
||||
yield self.updates._end_background_update("test_update")
|
||||
await self.updates._end_background_update("test_update")
|
||||
return count
|
||||
|
||||
self.update_handler.side_effect = update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue