# 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):
"""