Minor FAFT tweaks
The assert check in servo_test.py:wait_for_client() needs to to match
the while loop check (otherwise the assert would be out of sync with
the check in cases the original timeout is an odd or non-integer
number).
BUG=chromium-os:34392
TEST=manual
. ran FAFT and observed it succeed tests using the wait_for_client()
method
Change-Id: I2a11efc5856e5fae24e4262e44a3cd8ee4d328b4
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36473
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/servo_test.py b/server/cros/servo_test.py
index 9b1f7b8..5fc95b8 100644
--- a/server/cros/servo_test.py
+++ b/server/cros/servo_test.py
@@ -252,7 +252,7 @@
# Wait for the client to come up.
while timeout > 0 and not self._sshd_test(self._client.ip, timeout=2):
timeout -= 2
- assert timeout, 'Timed out waiting for client to reboot.'
+ assert (timeout > 0), 'Timed out waiting for client to reboot.'
logging.info('Server: Client machine is up.')
# Relaunch remote clients.
for name, info in self._remote_infos.iteritems():