]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Wait longer for the TLS ticket to arrive in our tests 8591/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 28 Nov 2019 10:39:51 +0000 (11:39 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 28 Nov 2019 10:39:51 +0000 (11:39 +0100)
In TLS 1.3 the server sends the TLS ticket after the handshake has
been completed, but not necessarily right after that.
Ideally we would like to wait for up to several seconds, but stop
waiting as soon as we receive a ticket. Unfortunately we can't ask
that from `openssl s_client`, and we are currently not always waiting
long enough to get a ticket, leading to spurious failures.
Let's try waiting a bit longer to see if that helps.

regression-tests.dnsdist/test_TLSSessionResumption.py

index 190a32af6dd23d61ae4e5ca88b9d5caf49dde350..4f9dfd6194c3e1cf6a11f5892d1bda4ad59fb9c4 100644 (file)
@@ -32,7 +32,7 @@ class DNSDistTLSSessionResumptionTest(DNSDistTest):
         try:
             process = subprocess.Popen(testcmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
             # we need to wait just a bit so that the Post-Handshake New Session Ticket has the time to arrive..
-            time.sleep(0.1)
+            time.sleep(0.5)
             output = process.communicate(input=b'')
         except subprocess.CalledProcessError as exc:
             raise AssertionError('%s failed (%d): %s' % (testcmd, process.returncode, process.output))