]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make ttl value's origin clear 10426/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 4 Jun 2021 12:58:50 +0000 (14:58 +0200)
committerGitHub <noreply@github.com>
Fri, 4 Jun 2021 12:58:50 +0000 (14:58 +0200)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/recursordist/test-syncres_cc2.cc

index 6c8ef50cff181a4bc62471307ef30c18a8c74b24..03d52c1071896b9a798206ba111284aa18420c38 100644 (file)
@@ -1845,7 +1845,7 @@ BOOST_AUTO_TEST_CASE(test_cache_almost_expired_ttl)
   BOOST_REQUIRE(ret[0].d_type == QType::NS);
   BOOST_CHECK_EQUAL(getRR<NSRecordContent>(ret[0])->getNS(), DNSName("pdns-public-ns1.powerdns.com."));
   ttl = ret[0].d_ttl - now;
-  BOOST_CHECK_EQUAL(ttl, 86400U);
+  BOOST_CHECK_EQUAL(ttl, std::min(SyncRes::s_maxcachettl, 172800U));
 
   // ATM we are not testing the almost expiry of root infra records, it would require quite some cache massage...
 }