From 964902fa41f2d2da6960942edafcc54bb5b4c3c4 Mon Sep 17 00:00:00 2001 From: Joachim Rauch Date: Fri, 18 Aug 2017 14:39:15 +0200 Subject: [PATCH] Fix test_running by trying up to five times Fixed test running by looking up to five times with a waiting time of 30 seconds between each try Necessary due to slow starting test used in start_test --- tests/osautoinst/test_running.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/osautoinst/test_running.pm b/tests/osautoinst/test_running.pm index 46f6afa4..84bf2572 100644 --- a/tests/osautoinst/test_running.pm +++ b/tests/osautoinst/test_running.pm @@ -3,7 +3,7 @@ use base "openQAcoretest"; use testapi; sub run { - assert_script_run 'openqa-client jobs state=running | grep --color -z running'; + assert_script_run ' ret=false; for i in {1..5} ; do openqa-client jobs state=running | grep --color -z running && ret=true && break ; sleep 30 ; done ; [ "$ret" = "true" ] ; echo $? ' ,300; save_screenshot; type_string "clear\n"; }