From 41eefc7824797a0b39cc14cce862c7158777d661 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 25 Apr 2025 16:55:11 +0200 Subject: [PATCH] dnsdist: Fix spurious failure of the TCP limits regression tests The "maximum duration" test used to trigger the maximum number of TCP read IOs, preventing the next test from being run. This commit sets the maximum number of TCP read IOs to "unlimited" for this test. --- regression-tests.dnsdist/test_TCPLimits.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/regression-tests.dnsdist/test_TCPLimits.py b/regression-tests.dnsdist/test_TCPLimits.py index c98d3641cd..7ecdcf6f9a 100644 --- a/regression-tests.dnsdist/test_TCPLimits.py +++ b/regression-tests.dnsdist/test_TCPLimits.py @@ -29,6 +29,9 @@ class TestTCPLimits(DNSDistTest): setMaxTCPConnectionDuration(%d) -- disable "near limits" otherwise our tests are broken because connections are forcibly closed setTCPConnectionsOverloadThreshold(0) + -- disable the maximum number of read IOs per query, otherwise the maximum duration (testTCPDuration) + -- test gets us banned very quickly + setMaxTCPReadIOsPerQuery(0) """ _config_params = ['_testServerPort', '_tcpIdleTimeout', '_maxTCPQueriesPerConn', '_maxTCPConnsPerClient', '_maxTCPConnDuration'] @@ -161,6 +164,7 @@ class TestTCPLimitsReadIO(DNSDistTest): self.assertGreater(len(payload), self._maxTCPReadIOsPerQuery) conn = self.openTCPConnection() + conn.send(struct.pack("!H", len(payload))) count = 0 failed = False -- 2.47.2