Autopilot test flakyness in test_add_photo

Bug #1304950 reported by Łukasz Zemczak
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gallery-app
Fix Released
Low
Unassigned
gallery-app (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

There seems to be a test flakyness in one of the gallery_app tests. In smoketesting [1] we noticed in 2 images failures in the same test: gallery_app.tests.test_album_view.TestAlbumView.test_add_photo. After a re-run, the test passed fine. The same failure was not reproducible on my local device.

From the logs it seems that maybe the MediaSelector doesn't appear - maybe the toolbar didn't get unhidden properly and the button click wasn't registered? Hard to say without reproducing it locally.

Traceback (most recent call last):
  File "/home/phablet/autopilot/legacy-py2/gallery_app/tests/test_album_view.py", line 83, in test_add_photo
    self.ensure_media_selector_is_fully_open()
  File "/home/phablet/autopilot/legacy-py2/gallery_app/tests/test_album_view.py", line 46, in ensure_media_selector_is_fully_open
    media_selector = self.media_selector.get_media_selector()
  File "/home/phablet/autopilot/legacy-py2/gallery_app/emulators/media_selector.py", line 19, in get_media_selector
    return self.app.wait_select_single("MediaSelector")
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 375, in wait_select_single
    return self.select_single(type_name, **kwargs)
  File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 324, in select_single
    raise StateNotFoundError(type_name, **kwargs)
StateNotFoundError: Object not found with name 'MediaSelector'.

[1] http://ci.ubuntu.com/smokeng/trusty/touch/mako/282:20140408.1:20140331/7634/gallery_app/994652/ <- the same failure was present in the next image, 283, but the re-run passed fine.

Related branches

Revision history for this message
Barry Warsaw (barry) wrote :

I've noticed several flaky tests in my Python 3 port: https://code.launchpad.net/~barry/gallery-app/py3autopilot/+merge/208055/comments/514642

Building and running the app on desktop produces 13 test failures fairly regularly, both with trunk and my branch.

Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

I've fixed the desktop failures and made the add_photo test reliable here:

lp:~chris.gagnon/gallery-app/autopilot-fix-flakyness-and-make-work-on-desktop

Revision history for this message
Barry Warsaw (barry) wrote :

Chris, all tests pass on desktop.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gallery-app (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gallery-app - 0.0.67+14.10.20140505-0ubuntu1

---------------
gallery-app (0.0.67+14.10.20140505-0ubuntu1) utopic; urgency=low

  [ Chris Gagnon ]
  * fix tests on desktop, fix flaky test, pep8 fixes, refactor test to
    make failures easier to diagnose. [barry] py3 port (LP: #1304950)
 -- Ubuntu daily release <email address hidden> Mon, 05 May 2014 14:43:25 +0000

Changed in gallery-app (Ubuntu):
status: Confirmed → Fix Released
Changed in gallery-app:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.