]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Use the same UDP timeouts than usual in the 'advanced' tests
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Aug 2023 10:55:10 +0000 (12:55 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Aug 2023 10:59:02 +0000 (12:59 +0200)
It makes sense to use a short timeout when we know this is going to
fail, but here we actually expect a response, and it seems that the
current timeout is sometimes too short when running with TSAN,
especially when we have a lot of tests running in parallel.

regression-tests.dnsdist/test_Advanced.py

index a30c1318dabe9173ac522ea297aa9aa9279eeb41..65354bb444b365c61684fc4f179520832595c793 100644 (file)
@@ -344,7 +344,7 @@ class TestAdvancedGetLocalAddressOnAnyBind(DNSDistTest):
                                     'address-was-127-0-0-2.local-address-any.advanced.tests.powerdns.com.')
         response.answer.append(rrset)
         sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-        sock.settimeout(1.0)
+        sock.settimeout(2.0)
         sock.connect(('127.0.0.2', self._dnsDistPort))
         try:
             query = query.to_wire()
@@ -377,7 +377,7 @@ class TestAdvancedGetLocalAddressOnAnyBind(DNSDistTest):
 
         # a bit more tricky, UDP-only IPv4
         sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-        sock.settimeout(1.0)
+        sock.settimeout(2.0)
         sock.connect(('127.0.0.2', self._dnsDistPort))
         self._toResponderQueue.put(response, True, 1.0)
         try:
@@ -400,7 +400,7 @@ class TestAdvancedGetLocalAddressOnAnyBind(DNSDistTest):
 
         # a bit more tricky, UDP-only IPv6
         sock = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
-        sock.settimeout(1.0)
+        sock.settimeout(2.0)
         sock.connect(('::1', self._dnsDistPort))
         self._toResponderQueue.put(response, True, 1.0)
         try:
@@ -448,7 +448,7 @@ class TestAdvancedGetLocalAddressOnNonDefaultLoopbackBind(DNSDistTest):
 
         # a bit more tricky, UDP-only IPv4
         sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-        sock.settimeout(1.0)
+        sock.settimeout(2.0)
         sock.connect(('127.0.1.19', self._dnsDistPort))
         self._toResponderQueue.put(response, True, 1.0)
         try: