From: Remi Gacogne Date: Fri, 25 Apr 2025 14:55:11 +0000 (+0200) Subject: dnsdist: Fix spurious failure of the TCP limits regression tests X-Git-Tag: dnsdist-2.0.0-alpha2~51^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15473%2Fhead;p=thirdparty%2Fpdns.git 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. --- 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