From be7cb52a8caf9279f672983afdbd12b64562ae4a Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 28 Jun 2021 10:07:16 +0200 Subject: [PATCH] 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. --- regression-tests.dnsdist/test_Caching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}) -- 2.47.2