New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sporadic errors in test_results due to tutorial popup #10435
Conversation
If you want to fix sporadic results I recommend you test more than one run – and the one you referenced failed anyway. Could we please try to find a fix that is not going back to the old way of checking screen multiple times and relying on timing behaviour? |
https://openqa.opensuse.org/tests/1285301#step/test_results/2 shows that "All Tests" is clicked but in the same screen "dont-notify-me" is detected. Either we add a wait_still_screen there or – probably better – include the "reload" button from the browser bar or the favicon area in the needle to not match while a screen is loading. So likely the problem can be fixed without any code changes, just proper needles |
edb4d2b
to
c08cfa8
Compare
Detecting the browser loading indicatior doesn't sound very clean to me and could easily break. |
No doubt about that. I am not sure your approach will be more stable though. But it's ok this way and we can try LGTM |
It looks much better now (I also fixed some needle problem). |
tests/openqa/webui/test_results.pm
Outdated
@@ -38,6 +38,12 @@ sub upload_autoinst_log { | |||
|
|||
sub handle_notify_popup { | |||
return undef unless match_has_tag 'openqa-dont-notify-me'; | |||
for my $i (1 .. 5) { | |||
assert_and_click 'openqa-dont-notify-me'; | |||
if (check_screen('openqa-tutorial-confirm')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check screen also for openqa-dont-notify-toggled
, and if so, click the confirm? https://openqa.opensuse.org/tests/1288011#step/test_results/7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The confirm button is only visible when the checkbox is already toggled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but in the test that I reference, the button is shown already :P, and openQA is looking for the unchecked box...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - seems that check_screen
doesn't have any timeout which leads to thes race condition.
Adding a timeout should do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was fine with the check_screen
without timeout but now again you add back a rather inefficient approach wasting lot of time waiting for nothing to happen. Please use proper needles which exclude each other and multi-tag assert_screen calls
That might still lead to a race condition if the screen is not updated fast enough (which is exactly the reason of the current race condition). |
It's not just 30s if you consider TIMEOUT_SCALE and a for loop doing up to 5x check_screen. And there can be cases where even a waiting time of 30s is not enough, if the server is a bit slow to respond so to put it to extreme you would need to extend the waiting time even more which is not what I suggest to do. I would be ok if you put in a |
I don't see any advantage in It might make sence to reduce the timeout to 15 seconds as that might be sufficient, though. |
I wonder, how https://openqa.opensuse.org/tests/1289107#step/test_results/18 can happen. |
hm, I also don't see any obvious difference in https://openqa.opensuse.org/tests/1289107#step/test_results/18 . Maybe there is very subtle change in shading. You might be able to avoid the exclude area with just covering the test module name and the green color of "passed" without the text |
96a938f
to
37455ed
Compare
37455ed
to
7bae89e
Compare
7bae89e
to
7aee660
Compare
Ticket: https://progress.opensuse.org/issues/67660
First Verification: https://openqa.opensuse.org/t1287908