From: Remi Gacogne Date: Mon, 11 Jun 2018 15:36:36 +0000 (+0200) Subject: auth: Increase the packet cache TTL in our unit tests X-Git-Tag: dnsdist-1.3.1~35^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f776457f7e3fcac55e42e1a8a28849ac0ad925b9;p=thirdparty%2Fpdns.git auth: Increase the packet cache TTL in our unit tests Hopefully this will lower the risks of failure on slow hosts, like our pi builder. --- diff --git a/pdns/test-packetcache_cc.cc b/pdns/test-packetcache_cc.cc index 5b95d09787..b64e892f96 100644 --- a/pdns/test-packetcache_cc.cc +++ b/pdns/test-packetcache_cc.cc @@ -149,7 +149,7 @@ try pak.clear(); DNSPacketWriter pw2(pak, qname, QType::A); - pw2.startRecord(qname, QType::A, 16, 1, DNSResourceRecord::ANSWER); + pw2.startRecord(qname, QType::A, 3600, QClass::IN, DNSResourceRecord::ANSWER); pw2.xfrIP(htonl(0x7f000001)); pw2.commit(); @@ -160,7 +160,8 @@ try DNSPacket cached(false); g_PC->get(&q, &cached); - g_PC->insert(&q, &r, 60); + const unsigned int maxTTL = 3600; + g_PC->insert(&q, &r, maxTTL); } return 0; @@ -200,7 +201,7 @@ BOOST_AUTO_TEST_CASE(test_PacketCacheThreaded) { try { AuthPacketCache PC; PC.setMaxEntries(1000000); - PC.setTTL(20); + PC.setTTL(3600); g_PC=&PC; pthread_t tid[4];