1
0

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.
This commit is contained in:
David Robertson
2022-07-04 11:37:51 +01:00
parent 7a14b94698
commit 240e32f264
2 changed files with 3 additions and 3 deletions

View File

@@ -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,
)

View File

@@ -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,
),
)
],