summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-07-04 11:37:51 +0100
committerDavid Robertson <davidr@element.io>2022-07-04 19:10:15 +0100
commit240e32f264acdca2954c9689429d7dd6ba0ee83b (patch)
treef2bdd0bfcac127870f3def0368aea444fa573bde
parentTest cases (diff)
downloadsynapse-240e32f264acdca2954c9689429d7dd6ba0ee83b.tar.xz
Fixes to unit tests
- FederatingHomeserverTestCase: keys last 10x longer

  I am guessing that this is the first example of a test which calls
  `make_signed_federation_request` after the reactor has advanced by >=
  1 second until now.

- Increase max_request_body_size to 4KB in tests

  The previous limit prevented the master from accepting some
  replication requests which were 1.3kB in size.
-rw-r--r--tests/test_server.py2
-rw-r--r--tests/unittest.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_server.py b/tests/test_server.py
index 847432f791..038a7b8a0b 100644
--- a/tests/test_server.py
+++ b/tests/test_server.py
@@ -225,7 +225,7 @@ class OptionsResourceTests(unittest.TestCase):
             parse_listener_def({"type": "http", "port": 0}),
             self.resource,
             "1.0",
-            max_request_body_size=1234,
+            max_request_body_size=4096,
             reactor=self.reactor,
         )
 
diff --git a/tests/unittest.py b/tests/unittest.py
index c645dd3563..b6c0b83a0c 100644
--- a/tests/unittest.py
+++ b/tests/unittest.py
@@ -285,7 +285,7 @@ class HomeserverTestCase(TestCase):
             config=self.hs.config.server.listeners[0],
             resource=self.resource,
             server_version_string="1",
-            max_request_body_size=1234,
+            max_request_body_size=4096,
             reactor=self.reactor,
         )
 
@@ -780,7 +780,7 @@ class FederatingHomeserverTestCase(HomeserverTestCase):
                         verify_key_id,
                         FetchKeyResult(
                             verify_key=verify_key,
-                            valid_until_ts=clock.time_msec() + 1000,
+                            valid_until_ts=clock.time_msec() + 10000,
                         ),
                     )
                 ],