[autotest] Fix flakey ClientTest
A test was accidentally assigned a timeout of 0 instead of the test timeout,
which is resulting in flakey behaviour when it races against the setup code.
BUG=chromium:783449
TEST=Run test repeatedly on a system with simulated heavy load. Observe flake
rates >1/100 before the fix; after the fix, 500 runs with no failures.
Change-Id: I486228cc6cd71048241dbc8a3b2d19944c7e7723
Reviewed-on: https://chromium-review.googlesource.com/763919
Trybot-Ready: Ben Kwa <kenobi@chromium.org>
Reviewed-by: Aviv Keshet <akeshet@chromium.org>
Tested-by: Ben Kwa <kenobi@chromium.org>
Commit-Queue: Ben Kwa <kenobi@chromium.org>
diff --git a/site_utils/lxc/container_pool/client_unittest.py b/site_utils/lxc/container_pool/client_unittest.py
index 96ef040..2db84e4 100755
--- a/site_utils/lxc/container_pool/client_unittest.py
+++ b/site_utils/lxc/container_pool/client_unittest.py
@@ -59,8 +59,8 @@
# Connect a client, then verify that the host connection is established.
host = None
- with client.Client.connect(self.address, 0):
- host = self.listener.get_connection()
+ with client.Client.connect(self.address, TIMEOUT):
+ host = self.listener.get_connection(TIMEOUT)
self.assertIsNotNone(host)
# Client closed - check that the host connection also closed.