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.
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})