]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Increase the TTL of test answers to prevent spurious failures 10531/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 Jun 2021 08:07:16 +0000 (10:07 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 Jun 2021 08:07:16 +0000 (10:07 +0200)
The value of the TTL for negative answers was capped to 1s, which means
that the answer will only be present in the cache for the current second.
If the test starts at the end of a second in unix time, there is a real
risk that the entry is no longer usable when we try to fetch it from the
cache. Increase the TTL to 2s instead to reduce that risk.

regression-tests.dnsdist/test_Caching.py

index 1f69f56c7f93564f2513f162a60bb1ab32f60e0e..9c6253e3ff1b7883b079c8b064f17ec007756094 100644 (file)
@@ -1918,7 +1918,7 @@ class TestCachingFailureTTL(DNSDistTest):
 
 class TestCachingNegativeTTL(DNSDistTest):
 
-    _negCacheTTL = 1
+    _negCacheTTL = 2
     _config_params = ['_negCacheTTL', '_testServerPort']
     _config_template = """
     pc = newPacketCache(1000, {maxTTL=86400, minTTL=0, temporaryFailureTTL=60, staleTTL=60, dontAge=false, numberOfShards=1, deferrableInsertLock=true, maxNegativeTTL=%d})