From: Michał Kępień Date: Wed, 23 Jul 2025 10:16:25 +0000 (+0200) Subject: Account for idle timeouts in the "dispatch" test X-Git-Tag: v9.21.11~26^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48e705d738bcd34f6f868810503af4236504afcb;p=thirdparty%2Fbind9.git Account for idle timeouts in the "dispatch" test When the tests-connreset.py module was initially implemented in commit 5c17919019ef0af8226e5bb61214b805bb3e2451, the dispatch code did not properly apply the idle timeout to TCP connections. This allowed the check in that test module to reset the TCP connection after 5 seconds as named did not attempt to tear the connection down earlier than that. However, as the dispatch code was improved, the idle timeout started being enforced for TCP dispatches; the exact value it is set to in the current code depends on a given server's SRTT, but it defaults to about 1.2 seconds for responsive servers. This means that the code paths triggered by the "dispatch" system test are now different than the ones it was originally supposed to trigger because it is now named itself that shuts the TCP connection down cleanly before the ans3 server gets a chance to reset it. Account for the above by lowering the amount of time after which the ans3 server in the "dispatch" system test resets TCP connections to just 1 second, so that the test actually does what its name implies. --- diff --git a/bin/tests/system/dispatch/ans3/ans.py b/bin/tests/system/dispatch/ans3/ans.py index 270ac38e3e6..653232f9915 100644 --- a/bin/tests/system/dispatch/ans3/ans.py +++ b/bin/tests/system/dispatch/ans3/ans.py @@ -36,7 +36,7 @@ class TruncateOnUdpHandler(ResponseHandler): def main() -> None: server = AsyncDnsServer() - server.install_connection_handler(ConnectionReset(delay=5.0)) + server.install_connection_handler(ConnectionReset(delay=1.0)) server.install_response_handler(TruncateOnUdpHandler()) server.run()