Autotest: Reduce servo init timeout to 10 seconds.
Since we try creating a servo object multiple times, reducing the
initialization timeout from 60 seconds to 10.
BUG=None.
TEST=local setup.
Change-Id: Ia3c008c5e4563fb993c229ea8d151d5c65d6d02b
Reviewed-on: https://gerrit.chromium.org/gerrit/63234
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
diff --git a/server/cros/servo/servo.py b/server/cros/servo/servo.py
index 7f394cd..07d1558 100644
--- a/server/cros/servo/servo.py
+++ b/server/cros/servo/servo.py
@@ -62,8 +62,8 @@
# Time to keep USB power off before and after USB mux direction is changed
USB_POWEROFF_DELAY = 2
- # Time to wait before timing out on a dut-control call.
- CALL_TIMEOUT_SECS = 60
+ # Time to wait before timing out on servo initialization.
+ INIT_TIMEOUT_SECS = 10
KEY_MATRIX_ALT_0 = {
'ctrl_refresh': ['0', '0', '0', '1'],
@@ -585,7 +585,7 @@
# grabs the pwr_button state and if it times out raises an error.
timeout, result = retry.timeout(
self._server.get, args=('pwr_button', ),
- timeout_sec=Servo.CALL_TIMEOUT_SECS)
+ timeout_sec=Servo.INIT_TIMEOUT_SECS)
if timeout:
raise error.AutotestError('Timed out getting value for '
'pwr_button.')