From d2b8a997977712403cfaeb11ea2f22a9cefc2bc8 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Thu, 20 Jul 2023 13:56:35 +0200 Subject: [PATCH] rec: Don't check TTLs of records coming out of packet cache in regress tests That won't work on a slow system --- regression-tests.recursor-dnssec/test_Protobuf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/regression-tests.recursor-dnssec/test_Protobuf.py b/regression-tests.recursor-dnssec/test_Protobuf.py index 79d57e4561..347c918832 100644 --- a/regression-tests.recursor-dnssec/test_Protobuf.py +++ b/regression-tests.recursor-dnssec/test_Protobuf.py @@ -974,8 +974,8 @@ auth-zones=example=configs/%s/example.zone""" % _confdir self.checkProtobufResponse(msg, dnsmessage_pb2.PBDNSMessage.UDP, res) self.assertEqual(len(msg.response.rrs), 1) rr = msg.response.rrs[0] - # we have max-cache-ttl set to 15 - self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15) + # time may have passed, so do not check TTL + self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15, checkTTL=False) self.assertEqual(socket.inet_ntop(socket.AF_INET, rr.rdata), '192.0.2.84') tags = [ self._tag_from_gettag ] + self._tags self.checkProtobufTags(msg, tags) @@ -1028,8 +1028,8 @@ auth-zones=example=configs/%s/example.zone""" % _confdir self.checkProtobufResponse(msg, dnsmessage_pb2.PBDNSMessage.UDP, res) self.assertEqual(len(msg.response.rrs), 1) rr = msg.response.rrs[0] - # we have max-cache-ttl set to 15 - self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15) + # time may have passed, so do not check TTL + self.checkProtobufResponseRecord(rr, dns.rdataclass.IN, dns.rdatatype.A, name, 15, checkTTL=False) self.assertEqual(socket.inet_ntop(socket.AF_INET, rr.rdata), '192.0.2.84') self.checkNoRemainingMessage() self.assertEqual(len(msg.response.tags), 1) -- 2.47.2