From: Remi Gacogne Date: Mon, 11 May 2026 15:43:12 +0000 (+0200) Subject: dnsdist: Fix flaky TCP rate limiting regression tests X-Git-Tag: auth-5.1.0~72^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b749e1d33cdee25d35bcde41c5073f85d25c65a;p=thirdparty%2Fpdns.git dnsdist: Fix flaky TCP rate limiting regression tests Signed-off-by: Remi Gacogne --- diff --git a/regression-tests.dnsdist/test_TCPLimits.py b/regression-tests.dnsdist/test_TCPLimits.py index 3839735041..87aac30a3f 100644 --- a/regression-tests.dnsdist/test_TCPLimits.py +++ b/regression-tests.dnsdist/test_TCPLimits.py @@ -245,7 +245,7 @@ class TestTCPLimitsConnectionRate(DNSDistTest): # if we are unlucky a few of our connections fell into a different bucket, # which is more likely if the test runner is slow, so let's allow up to # self._maxConnectionRate * 2 - for idx in range(self._maxConnectionRate): + for idx in range(self._maxConnectionRate + 1): (receivedQuery, receivedResponse) = self.sendTCPQuery(query, response=None, useQueue=False) if receivedQuery is None and receivedResponse is None: blocked = True @@ -308,7 +308,7 @@ class TestTCPLimitsTLSNewSessionRate(DNSDistTest): # if we are unlucky a few of our connections fell into a different bucket, # which is more likely if the test runner is slow, so let's allow up to # _maxNewTLSSessionRate * 2 + 1 - for idx in range(self._maxNewTLSSessionRate): + for idx in range(self._maxNewTLSSessionRate + 1): try: self.sendDOTQueryWrapper(query, response=None, useQueue=False) except ConnectionResetError: @@ -387,8 +387,8 @@ class TestTCPLimitsTLSResumedSessionRate(DNSDistTest): blocked = False # if we are unlucky a few of our connections fell into a different bucket, # which is more likely if the test runner is slow, so let's allow up to - # self._maxResumedTLSSessionRate * 2 = 2 - for idx in range(self._maxResumedTLSSessionRate): + # self._maxResumedTLSSessionRate * 2 + 2 + for idx in range(self._maxResumedTLSSessionRate + 1): try: conn = self.openTLSConnection( self._tlsServerPort, self._serverName, self._caCert, timeout=1, sslctx=sslctx, session=session