]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Update the outgoing DoT tests now that we save TLS tickets during healthchecks
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 26 Nov 2021 12:51:13 +0000 (13:51 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 26 Nov 2021 12:51:13 +0000 (13:51 +0100)
regression-tests.dnsdist/test_OutgoingTLS.py

index 53677a66123b55f3df0491482dc3aa838cd98608..c07be663375ed8461c368522bb22a1fc9363f321 100644 (file)
@@ -65,8 +65,10 @@ class OutgoingTLSTests(object):
         # we tried to reuse the connection (and then it failed but hey)
         self.assertEqual(self.getServerStat('tcpReusedConnections'), numberOfQueries - 1)
         # we resumed the TLS session, though, but since we only learn about that
-        # when the connection is closed, we are off by one
-        self.assertEqual(self.getServerStat('tlsResumptions'), numberOfUDPQueries - 1)
+        # when the connection is closed, we might be off by one, except if a health check
+        # allowed the first TCP connection to be resumed as well
+        self.assertGreaterEqual(self.getServerStat('tlsResumptions'), numberOfUDPQueries - 1)
+        self.assertLessEqual(self.getServerStat('tlsResumptions'), numberOfUDPQueries)
 
     def testTCP(self):
         """