diff options
author | H. Shay <hillerys@element.io> | 2022-04-19 19:00:42 -0700 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2022-04-21 11:49:51 +0100 |
commit | 738742f439746b3486ed9e93d1b0c6b2bacfbd14 (patch) | |
tree | d05195bf0e31ba3e83a1a501ddfc2f1b7647128a | |
parent | lint (diff) | |
download | synapse-738742f439746b3486ed9e93d1b0c6b2bacfbd14.tar.xz |
add simple test
-rw-r--r-- | tests/http/test_fedclient.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/http/test_fedclient.py b/tests/http/test_fedclient.py index 638babae69..8401615542 100644 --- a/tests/http/test_fedclient.py +++ b/tests/http/test_fedclient.py @@ -33,7 +33,7 @@ from synapse.http.matrixfederationclient import ( from synapse.logging.context import SENTINEL_CONTEXT, LoggingContext, current_context from tests.server import FakeTransport -from tests.unittest import HomeserverTestCase +from tests.unittest import HomeserverTestCase, override_config def check_logcontext(context): @@ -617,3 +617,19 @@ class FederationClientTests(HomeserverTestCase): self.assertIsInstance(f.value, RequestSendFailed) self.assertTrue(transport.disconnecting) + + @override_config( + { + "experimental_features": { + "max_long_retry_delay": 100, + "max_short_retry_delay": 7, + "max_long_retries": 20, + "max_short_retries": 5, + } + } + ) + def test_configurable_retry_and_delay_values(self): + self.assertEqual(self.cl.max_long_retry_delay, 100) + self.assertEqual(self.cl.max_short_retry_delay, 7) + self.assertEqual(self.cl.max_long_retries, 20) + self.assertEqual(self.cl.max_short_retries, 5) |