summary refs log tree commit diff
path: root/tests/http/test_fedclient.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2022-05-25 23:24:28 +0200
committerGitHub <noreply@github.com>2022-05-25 22:24:28 +0100
commit1b338476afbcb83918c5df285975878032bbce75 (patch)
tree0967fc6095af6d2eccbf46d57160405b534d61f0 /tests/http/test_fedclient.py
parentFix up `state_store` naming (#12871) (diff)
downloadsynapse-1b338476afbcb83918c5df285975878032bbce75.tar.xz
Allow bigger responses to `/federation/v1/state` (#12877)
* Refactor HTTP response size limits

Rather than passing a separate `max_response_size` down the stack, make it an
attribute of the `parser`.

* Allow bigger responses on `federation/v1/state`

`/state` can return huge responses, so we need to handle that.
Diffstat (limited to '')
-rw-r--r--tests/http/test_fedclient.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/http/test_fedclient.py b/tests/http/test_fedclient.py
index 638babae69..006dbab093 100644
--- a/tests/http/test_fedclient.py
+++ b/tests/http/test_fedclient.py
@@ -26,7 +26,7 @@ from twisted.web.http import HTTPChannel
 
 from synapse.api.errors import RequestSendFailed
 from synapse.http.matrixfederationclient import (
-    MAX_RESPONSE_SIZE,
+    JsonParser,
     MatrixFederationHttpClient,
     MatrixFederationRequest,
 )
@@ -609,9 +609,9 @@ class FederationClientTests(HomeserverTestCase):
         while not test_d.called:
             protocol.dataReceived(b"a" * chunk_size)
             sent += chunk_size
-            self.assertLessEqual(sent, MAX_RESPONSE_SIZE)
+            self.assertLessEqual(sent, JsonParser.MAX_RESPONSE_SIZE)
 
-        self.assertEqual(sent, MAX_RESPONSE_SIZE)
+        self.assertEqual(sent, JsonParser.MAX_RESPONSE_SIZE)
 
         f = self.failureResultOf(test_d)
         self.assertIsInstance(f.value, RequestSendFailed)