]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Use a 2s TTL in testCacheNoStale to prevent failures 10547/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Jun 2021 16:41:01 +0000 (18:41 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 30 Jun 2021 16:41:01 +0000 (18:41 +0200)
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.

regression-tests.dnsdist/test_Caching.py

index 9c6253e3ff1b7883b079c8b064f17ec007756094..e1a4e2b76ad7a53f849e9f6fc14ba5ecd44520a1 100644 (file)
@@ -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')