new_conn_before = self.getServerStats()[0]['tcpNewConnections']
reused_conn_before = self.getServerStats()[0]['tcpReusedConnections']
+ max_conn_before = self.getServerStats()[0]['tcpMaxConcurrentConnections']
conn = self.openTCPConnection(2.0)
data = query.to_wire()
server = self.getServerStats()[0]
self.assertEqual(server['tcpNewConnections'], new_conn_before + 1)
self.assertEqual(server['tcpReusedConnections'], reused_conn_before + 9)
- self.assertEqual(server['tcpMaxConcurrentConnections'], 1)
+ # we can only check that we did not open more than one new connection
+ # compared to the connections that existed before, because connections
+ # triggered by a different test can still be around
+ self.assertLessEqual(server['tcpMaxConcurrentConnections'], max_conn_before + 1)
def testProxyTCPSeveralQueriesWithRandomTLVOnSameConnection(self):
"""