From: Remi Gacogne Date: Wed, 30 Jun 2021 16:41:01 +0000 (+0200) Subject: dnsdist: Use a 2s TTL in testCacheNoStale to prevent failures X-Git-Tag: dnsdist-1.7.0-alpha1~114^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10547%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Use a 2s TTL in testCacheNoStale to prevent failures With the previous 1s TTL, the entry was only valid for the current second, but we might have been very near the end of that second already when inserting. With a 2s TTL (which was apparently intended anyway) we have a full second before the entry expires. --- diff --git a/regression-tests.dnsdist/test_Caching.py b/regression-tests.dnsdist/test_Caching.py index 9c6253e3ff..e1a4e2b76a 100644 --- a/regression-tests.dnsdist/test_Caching.py +++ b/regression-tests.dnsdist/test_Caching.py @@ -1002,7 +1002,7 @@ class TestCachingNoStale(DNSDistTest): query = dns.message.make_query(name, 'A', 'IN') response = dns.message.make_response(query) rrset = dns.rrset.from_text(name, - 1, + ttl, dns.rdataclass.IN, dns.rdatatype.A, '127.0.0.1')