Allow connection cleanup failures
Sometimes when executing servo connection clean up, FAFT fails for no
obvious reason. If the exception is caught, the test continues
successfully. This change catches the exception and adds reporting for
future analysis and further fixes.
BUG=chromium-os:23309
TEST=manual
. running FAFT multiple times observe 'Cleanup returned protocol
error:' messages in the log, but the test successfully continuing.
Change-Id: Ia98666fce0b9a146b7d7b445574f8872dd8ca817
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35217
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/server/cros/servo_test.py b/server/cros/servo_test.py
index 00350e2..9b1f7b8 100644
--- a/server/cros/servo_test.py
+++ b/server/cros/servo_test.py
@@ -284,7 +284,11 @@
for info in self._remote_infos.itervalues():
if info['remote_process'] and info['remote_process'].poll() is None:
remote_object = getattr(self, info['ref_name'])
- remote_object.cleanup()
+ try:
+ remote_object.cleanup()
+ logging.info('Cleanup succeeded.')
+ except xmlrpclib.ProtocolError, e:
+ logging.info('Cleanup returned protocol error: ' + str(e))
self._terminate_all_ssh()