]> git.ipfire.org Git - thirdparty/pdns.git/commit
Fix a spuriously failing recursorcache_cc test: reset globals (indirectly) used 13346/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Oct 2023 13:07:36 +0000 (15:07 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 9 Oct 2023 13:07:36 +0000 (15:07 +0200)
commit48d024360321fbebe6c9ce55bb0efe973825a4dc
tree59c73085aa016e81e7873d5b28ea02068ec4c85c
parentb0573356c9b15bdb4e32a153579a5207df42a63a
Fix a spuriously failing recursorcache_cc test: reset globals (indirectly) used

For SyncRes tests we have a general mechanism setting the globals
before the test are run, but the non-syncres tests do not have that, while
they still use some globals.  In this particular case, the test would
fail if the last SyncRes test run before was setting
SyncRes::s_locked_ttlperc.

While there, pass the time to the prune functions. This avoids
potential timing issues for some tests.
pdns/cachecleaner.hh
pdns/recursordist/negcache.cc
pdns/recursordist/negcache.hh
pdns/recursordist/rec-main.cc
pdns/recursordist/recpacketcache.cc
pdns/recursordist/recpacketcache.hh
pdns/recursordist/recursor_cache.cc
pdns/recursordist/recursor_cache.hh
pdns/recursordist/test-negcache_cc.cc
pdns/recursordist/test-recpacketcache_cc.cc
pdns/recursordist/test-recursorcache_cc.cc