summary refs log tree commit diff
path: root/tests/storage/test_background_update.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2021-11-24 20:21:44 +0100
committerGitHub <noreply@github.com>2021-11-24 19:21:44 +0000
commit7f9841bdec349075eb424c943db5569439acb83c (patch)
tree8d1b689fe5ec89497635217242eb77595780ed67 /tests/storage/test_background_update.py
parentRename unstable `access_token_lifetime` configuration option to `refreshable_... (diff)
downloadsynapse-7f9841bdec349075eb424c943db5569439acb83c.tar.xz
Lower minumum batch size to 1 for background updates (#11422)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Diffstat (limited to 'tests/storage/test_background_update.py')
-rw-r--r--tests/storage/test_background_update.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/storage/test_background_update.py b/tests/storage/test_background_update.py
index 0da42b5ac5..a5f5ebad41 100644
--- a/tests/storage/test_background_update.py
+++ b/tests/storage/test_background_update.py
@@ -19,11 +19,11 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
         )
 
     def test_do_background_update(self):
-        # the time we claim each update takes
-        duration_ms = 42
+        # the time we claim it takes to update one item when running the update
+        duration_ms = 4200
 
         # the target runtime for each bg update
-        target_background_update_duration_ms = 50000
+        target_background_update_duration_ms = 5000000
 
         store = self.hs.get_datastore()
         self.get_success(
@@ -57,7 +57,7 @@ class BackgroundUpdateTestCase(unittest.HomeserverTestCase):
 
         # on the first call, we should get run with the default background update size
         self.update_handler.assert_called_once_with(
-            {"my_key": 1}, self.updates.DEFAULT_BACKGROUND_BATCH_SIZE
+            {"my_key": 1}, self.updates.MINIMUM_BACKGROUND_BATCH_SIZE
         )
 
         # second step: complete the update