From 0cb57e75118e47d5472f03388b963958565e5daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Wed, 7 Dec 2022 10:00:33 +0100 Subject: [PATCH] Add timeout 30 secs to make less fragile. The check_screen function checks for the existing tag but it only waits 1 second by default. In this time, Abrt will not even start so we need to prolong the check_screen timeout to make sure the application has started (or at least give it enough time to try). --- tests/apps_startstop/kde/abrt.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/apps_startstop/kde/abrt.pm b/tests/apps_startstop/kde/abrt.pm index 0aae9ad3..85f5f42d 100644 --- a/tests/apps_startstop/kde/abrt.pm +++ b/tests/apps_startstop/kde/abrt.pm @@ -9,8 +9,16 @@ sub run { my $self = shift; # Start the application menu_launch_type('abrt'); - # Check that it is started - unless (check_screen('abrt_runs')) { + # Check that the application has started. + # On KDE, the test failed when Abrt started + # and there was an error caught. + # Now, if we do not find the needle that + # checks Abrt has started, we will also + # check for a reported issue - if we find that + # we can assume that Abrt has started indeed. + unless (check_screen('abrt_runs', timeout => 30)) { + # The above check needs some timeout because + # it might take some time before Abrt starts. assert_screen('abrt_runs_found_problem'); record_soft_failure("Abrt has reported issues."); }