From: bert hubert Date: Thu, 24 Aug 2017 14:50:06 +0000 (+0200) Subject: enhance test so it also covers non-truncation over TCP/IP for dnsdist dynamic truncation X-Git-Tag: auth-4.1.0-rc1~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2e59d2deaded19a994746c18202cf66f387f6f7;p=thirdparty%2Fpdns.git enhance test so it also covers non-truncation over TCP/IP for dnsdist dynamic truncation --- diff --git a/regression-tests.dnsdist/test_DynBlocks.py b/regression-tests.dnsdist/test_DynBlocks.py index b0aea87c6e..430d87e9b7 100644 --- a/regression-tests.dnsdist/test_DynBlocks.py +++ b/regression-tests.dnsdist/test_DynBlocks.py @@ -360,7 +360,7 @@ class TestDynBlockQPSActionTruncated(DNSDistTest): # let's clear the response queue self.clearToResponderQueue() - # we might be already blocked, but we should have been able to send + # we might be already truncated, but we should have been able to send # at least self._dynBlockQPS queries self.assertGreaterEqual(allowed, self._dynBlockQPS) @@ -372,6 +372,12 @@ class TestDynBlockQPSActionTruncated(DNSDistTest): (_, receivedResponse) = self.sendUDPQuery(query, response=None, useQueue=False) self.assertEquals(receivedResponse, truncatedResponse) + # check over TCP, which should not be truncated + (receivedQuery, receivedResponse) = self.sendTCPQuery(query, response) + + self.assertEquals(query, receivedQuery) + self.assertEquals(receivedResponse, response) + # wait until we are not blocked anymore time.sleep(self._dynBlockDuration + self._dynBlockPeriod)