Closed Bug 1150913 Opened 9 years ago Closed 9 years ago

test_rocketbar_add_collection_save_bookmark.py: "TimeoutException: TimeoutException: Timed out after 20.0 seconds"

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: onelson, Assigned: martijn.martijn)

References

()

Details

Attachments

(2 files)

http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.mozilla-central.nightly.ui.functional.smoke/141/HTML_Report/

http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk.ui.adhoc/767/HTML_Report/

Traceback (most recent call last):
  File "/var/jenkins/1/workspace/flame-kk.ui.adhoc/.env/local/lib/python2.7/site-packages/marionette_client-0.9-py2.7.egg/marionette/marionette_test.py", line 290, in run
    testMethod()
  File "/var/jenkins/1/workspace/flame-kk.ui.adhoc/tests/python/gaia-ui-tests/gaiatest/tests/functional/rocketbar/test_rocketbar_add_collection_save_bookmark.py", line 39, in test_rocketbar_add_collection
    add_link.tap_add_bookmark_to_home_screen_dialog_button()
  File "/var/jenkins/1/workspace/flame-kk.ui.adhoc/tests/python/gaia-ui-tests/gaiatest/apps/homescreen/regions/bookmark_menu.py", line 31, in tap_add_bookmark_to_home_screen_dialog_button
    Wait(self.marionette).until(lambda m: self.apps.displayed_app.name != self.name)
  File "/var/jenkins/1/workspace/flame-kk.ui.adhoc/.env/local/lib/python2.7/site-packages/marionette_driver-0.2-py2.7.egg/marionette_driver/wait.py", line 143, in until
    cause=last_exc)
TimeoutException: TimeoutException: Timed out after 20.1 seconds

test_rocketbar_add_collection_save_bookmark is failing in today's smoke build consistently. The test navigates from homescreen, hold tap and opens drop down and 'Add Collection': "Entertainment". After returning to home and opening "Entertainment", the phone hold taps on the 'imdb' bookmark, opening the 'Add to Homescreen' drop down for that particular app, where the test proceeds to halt. Potentially unable to recognize the element for confirm adding to homescreen:     add_link.tap_add_bookmark_to_home_screen_dialog_button()
Issue did not reproduce manually
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Attached patch quick_fix.diffSplinter Review
This seems to fix the failure on my device.

Again, a case where the dialog button is visible, but apparently not active yet, apparently.
Attachment #8588017 - Flags: review?(npark)
Attachment #8588017 - Flags: review?(jlorenzo)
There seems to be a pattern here, where we need a small sleep before we can succesfully tap the dialog button. I had a similar issue in bug 1146877.
Assignee: nobody → martijn.martijn
QA Whiteboard: [QAnalyst-Triage?][fxosqa-auto-backlog?] → [QAnalyst-Triage+][fxosqa-auto-backlog?]
Flags: needinfo?(pbylenga)
Comment on attachment 8588017 [details] [review]
[gaia] mwargers:test_rocketbar_add_collection_save_bookmark.py > mozilla-b2g:master

if  Wait(self.marionette).until(expected.element_displayed(element)) actually returns true before the element is really visible, then I agree this is the only fix.  But we should raise a bug about why expected.element_displayed does not match what's going on with the device.

Also, I think putting a sleep of 1 second won't hurt much either- increasing the wait 5 times would definitely help avoid the race condition we're seeing.
Attachment #8588017 - Flags: review?(npark) → review+
Comment on attachment 8588017 [details] [review]
[gaia] mwargers:test_rocketbar_add_collection_save_bookmark.py > mozilla-b2g:master

As bug 1146877 comment 6, it looks good enough to me, because we're dropping Gip. Otherwise, I would investigate it more and, likely, ask the dev team to enable the button when the event listener is ready.
Attachment #8588017 - Flags: review?(jlorenzo) → review+
Well, this might become a problem with MarionetteJS acceptance tests, too, so in the end we still might want to know when the event listener is ready (or something else, not sure what's going on here).
(In reply to No-Jun Park [:njpark] from comment #5)
> Comment on attachment 8588017 [details] [review]
> [gaia] mwargers:test_rocketbar_add_collection_save_bookmark.py >
> mozilla-b2g:master
> 
> if  Wait(self.marionette).until(expected.element_displayed(element))
> actually returns true before the element is really visible, then I agree
> this is the only fix.  But we should raise a bug about why
> expected.element_displayed does not match what's going on with the device.

That's not the case, the element is displayed, but it's not ready to receice the tap event yet, supposedly because the event listener hasn't registered yet.

> Also, I think putting a sleep of 1 second won't hurt much either- increasing
> the wait 5 times would definitely help avoid the race condition we're seeing.

I know, but I used the 0.2 value already else, I'd like to keep it consistent.
I filed bug 1152399 for finding a better way to the workaround of time.sleep() for tapping the dialog button.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: