From: Remi Gacogne Date: Mon, 28 Jun 2021 08:07:16 +0000 (+0200) Subject: dnsdist: Increase the TTL of test answers to prevent spurious failures X-Git-Tag: dnsdist-1.7.0-alpha1~120^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F10531%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Increase the TTL of test answers to prevent spurious failures 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. --- diff --git a/regression-tests.dnsdist/test_Caching.py b/regression-tests.dnsdist/test_Caching.py index 1f69f56c7f..9c6253e3ff 100644 --- a/regression-tests.dnsdist/test_Caching.py +++ b/regression-tests.dnsdist/test_Caching.py @@ -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})