Closed Bug 1072343 Opened 11 years ago Closed 11 years ago

Improve wait in test_camera_flash_modes.py

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: viorela, Assigned: viorela)

References

Details

Attachments

(3 files)

Test test_camera_flash_modes.py is failing intermittently on both master and v2.1: http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.mozilla-central.ui.functional.non-smoke/1/HTML_Report/ Repro rate - 2 out of 10 times I was able to reproduce the failure locally by running the automated test several times. The issue here is that we are trying to toggle flash off before the camera is done taking a picture. To be more explicit, after we take a photo, we wait for the thumbnail button to be displayed: https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py#L56 But after the first picture is taken, the thumbnail button is always displayed, so that wait is not really reliable. We need to improve it, so that we won't encounter intermittent failures. Please uplift the fix to v2.1 Traceback (most recent call last): File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/marionette_test.py", line 264, in run testMethod() File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/camera/test_camera_flash_modes.py", line 52, in test_camera_flash_modes self.camera.tap_toggle_flash_button() File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py", line 105, in tap_toggle_flash_button self.wait_for_condition(lambda m: self.current_flash_mode != initial_flash_mode) File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 56, in wait_for_condition Wait(self.marionette, timeout).until(method, message=message) File "/var/jenkins/1/workspace/flame-kk-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/wait.py", line 143, in until cause=last_exc) TimeoutException: TimeoutException: Timed out after 30.1 seconds Device firmware (date) 23 Sep 2014 17:14:12 Device firmware (incremental) eng.cltbld.20140923.201401 Device firmware (release) 4.4.2 Device identifier flame Gaia date 23 Sep 2014 11:22:24 Gaia revision ff6dbb006e4e Gecko build 20140923165902 Gecko revision afc933adf723 Gecko version 35.0a1
Assignee: nobody → viorela.ioia
Attachment #8495218 - Flags: review?(zcampbell)
Attachment #8495218 - Flags: review?(robert.chira)
Attachment #8495218 - Flags: review?(florin.strugariu)
Attachment #8495218 - Flags: review?(florin.strugariu) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
We need to uplift this to v2.1
Attachment #8495252 - Flags: review?(robert.chira)
Attachment #8495252 - Flags: review?(florin.strugariu)
Attachment #8495252 - Flags: review?(robert.chira)
Attachment #8495252 - Flags: review?(florin.strugariu)
Attachment #8495252 - Flags: review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
We need to uplift this to v2.0. Thanks a lot!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Cynthia, can you r? + merge this? Thanks!
Attachment #8502449 - Flags: review?(ctang)
Comment on attachment 8502449 [details] uplift to v2.0 : https://github.com/mozilla-b2g/gaia/pull/24993/files Hi Viorela, It works for me. Thanks a lot for your help. ====================================================== starting httpd running webserver on http://192.168.47.130:48589/ TEST-START test_camera_flash_modes.py test_camera_flash_modes (test_camera_flash_modes.TestCameraFlashModes) ... ok ---------------------------------------------------------------------- Ran 1 test in 44.525s OK SUMMARY ------- passed: 1 failed: 0 todo: 0
Attachment #8502449 - Flags: review?(ctang) → review+
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Good Job! Thanks Cynthia and Viorela! :D
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: