Skip to content

Commit

Permalink
Bump timeout on UDP with fallback.
Browse files Browse the repository at this point in the history
  • Loading branch information
rthalley committed Mar 1, 2024
1 parent aba268a commit 51db0f6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_query.py
Expand Up @@ -210,7 +210,7 @@ def testQueryUDPFallback(self):
for address in query_addresses:
qname = dns.name.from_text(".")
q = dns.message.make_query(qname, dns.rdatatype.DNSKEY)
(_, tcp) = dns.query.udp_with_fallback(q, address, timeout=2)
(_, tcp) = dns.query.udp_with_fallback(q, address, timeout=4)
self.assertTrue(tcp)

def testQueryUDPFallbackWithSocket(self):
Expand All @@ -226,7 +226,7 @@ def testQueryUDPFallbackWithSocket(self):
qname = dns.name.from_text(".")
q = dns.message.make_query(qname, dns.rdatatype.DNSKEY)
(_, tcp) = dns.query.udp_with_fallback(
q, address, udp_sock=udp_s, tcp_sock=tcp_s, timeout=2
q, address, udp_sock=udp_s, tcp_sock=tcp_s, timeout=4
)
self.assertTrue(tcp)

Expand Down Expand Up @@ -825,8 +825,11 @@ def test_wrong_id_wire_with_truncation_flag_and_truncation_raise(self):
bad_r.flags |= dns.flags.TC
bad_r_wire = bad_r.to_wire()
self.mock_receive(
bad_r_wire, ("127.0.0.1", 53), self.good_r_wire, ("127.0.0.1", 53),
raise_on_truncation=True
bad_r_wire,
("127.0.0.1", 53),
self.good_r_wire,
("127.0.0.1", 53),
raise_on_truncation=True,
)

def test_bad_wire_not_ignored(self):
Expand Down

0 comments on commit 51db0f6

Please sign in to comment.