Return min into waits
@@ -76,7 +76,7 @@ def expectedPoolInterconnectionTime(nodeCount):
# TODO check actual state
# multiply by 2 because we need to re-create connections which can be done on a second re-try only
# (we may send pings on some of the re-tries)
- return max(0.8 * config.TestRunningTimeLimitSec,
+ return min(0.8 * config.TestRunningTimeLimitSec,
interconnectionCount * nodeConnectionTimeout +
2 * config.RETRY_TIMEOUT_RESTRICTED + 2)
