From: Remi Gacogne Date: Fri, 15 Mar 2019 09:40:50 +0000 (+0100) Subject: dnsdist: Increase the base TTL to 2 as 1 might expire too soon X-Git-Tag: dnsdist-1.4.0-alpha1~32^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7c8f9a86ce912d87bb56bf2d1d2f189cb74ee36;p=thirdparty%2Fpdns.git dnsdist: Increase the base TTL to 2 as 1 might expire too soon Since we no longer use cached answers when the TTL drops to 0, we need a bit more of margin. --- diff --git a/regression-tests.dnsdist/test_Caching.py b/regression-tests.dnsdist/test_Caching.py index d50aa88694..dcc1749b1d 100644 --- a/regression-tests.dnsdist/test_Caching.py +++ b/regression-tests.dnsdist/test_Caching.py @@ -609,7 +609,7 @@ class TestCachingNoStale(DNSDistTest): Cache: Cache entry, set backend down, we should not get a stale entry """ - ttl = 1 + ttl = 2 name = 'nostale.cache.tests.powerdns.com.' query = dns.message.make_query(name, 'A', 'IN') response = dns.message.make_response(query) @@ -663,7 +663,7 @@ class TestCachingStale(DNSDistTest): """ misses = 0 - ttl = 1 + ttl = 2 name = 'stale.cache.tests.powerdns.com.' query = dns.message.make_query(name, 'A', 'IN') response = dns.message.make_response(query) @@ -729,7 +729,7 @@ class TestCachingStaleExpunged(DNSDistTest): """ misses = 0 drops = 0 - ttl = 1 + ttl = 2 name = 'stale-but-expunged.cache.tests.powerdns.com.' query = dns.message.make_query(name, 'A', 'IN') response = dns.message.make_response(query) @@ -803,7 +803,7 @@ class TestCachingStaleExpungePrevented(DNSDistTest): Cache: Cache entry, set backend down, wait for the cache cleaning to run and remove the entry, still get a cache HIT because the stale entry was not removed """ misses = 0 - ttl = 1 + ttl = 2 name = 'stale-not-expunged.cache.tests.powerdns.com.' query = dns.message.make_query(name, 'A', 'IN') response = dns.message.make_response(query) @@ -1578,7 +1578,7 @@ class TestCachingNegativeTTL(DNSDistTest): time.sleep(self._negCacheTTL + 1) - # we should not have cached for longer than the negativel TTL + # we should not have cached for longer than the negative TTL # so it should be a miss (receivedQuery, receivedResponse) = self.sendUDPQuery(query, response) self.assertTrue(receivedQuery)