Add retry post state check keyword timedout
The robot "Redfish Get States" keyword timed out after 2 minutes.
This is to re-try one more time to improve boot test success rate.
Change-Id: Icce3ae9f7b53ec4844a2a27ceb5aae1ec33ba59d
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/state.py b/lib/state.py
index 8bd6c39..44dc414 100755
--- a/lib/state.py
+++ b/lib/state.py
@@ -729,8 +729,15 @@
if need_rf:
cmd_buf = ["Redfish Get States"]
gp.dprint_issuing(cmd_buf)
- status, ret_values = \
- BuiltIn().run_keyword_and_ignore_error(*cmd_buf)
+ try:
+ status, ret_values = \
+ BuiltIn().run_keyword_and_ignore_error(*cmd_buf)
+ except Exception as ex:
+ # Robot raised UserKeywordExecutionFailed error exception.
+ gp.dprint_issuing("Retrying Redfish Get States")
+ status, ret_values = \
+ BuiltIn().run_keyword_and_ignore_error(*cmd_buf)
+
gp.dprint_vars(status, ret_values)
if status == "PASS":
state['redfish'] = '1'