mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 05:02:12 -04:00
Avoid raising the body exceeded error multiple times. (#9108)
Previously this code generated unreferenced `Deferred` instances which caused "Unhandled Deferreds" errors to appear in error situations.
This commit is contained in:
parent
9ffac2bef1
commit
74dd906041
4 changed files with 115 additions and 3 deletions
|
@ -1095,7 +1095,7 @@ class MatrixFederationAgentTests(unittest.TestCase):
|
|||
# Expire both caches and repeat the request
|
||||
self.reactor.pump((10000.0,))
|
||||
|
||||
# Repated the request, this time it should fail if the lookup fails.
|
||||
# Repeat the request, this time it should fail if the lookup fails.
|
||||
fetch_d = defer.ensureDeferred(
|
||||
self.well_known_resolver.get_well_known(b"testserv")
|
||||
)
|
||||
|
@ -1130,7 +1130,7 @@ class MatrixFederationAgentTests(unittest.TestCase):
|
|||
content=b'{ "m.server": "' + (b"a" * WELL_KNOWN_MAX_SIZE) + b'" }',
|
||||
)
|
||||
|
||||
# The result is sucessful, but disabled delegation.
|
||||
# The result is successful, but disabled delegation.
|
||||
r = self.successResultOf(fetch_d)
|
||||
self.assertIsNone(r.delegated_server)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue