Failure in test_settings_media_storage_change.py in camera.launch

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
While running this test, I keep getting this error:
TEST-START | test_settings_media_storage_change.py TestSettingsMediaStorageChange.test_settings_media_storage_change
TEST-UNEXPECTED-ERROR | test_settings_media_storage_change.py TestSettingsMediaStorageChange.test_settings_media_storage_change | ScriptTimeoutException: ScriptTimeoutException: timed out


Traceback (most recent call last):
  File "/Users/mwargers/.virtualenvs/zapion_test2/lib/python2.7/site-packages/marionette_client-1.0.0-py2.7.egg/marionette/marionette_test.py", line 296, in run
    testMethod()
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/tests/functional/settings/test_settings_media_storage_change.py", line 39, in test_settings_media_storage_change
    camera.launch()
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py", line 39, in launch
    Base.launch(self)
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 26, in launch
    self.app = self.apps.launch(self.name, self.manifest_url, self.entry_point, launch_timeout=launch_timeout)
  File "/Users/mwargers/B2G/gaia_clean/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 96, in launch
    % (manifest_url, json.dumps(entry_point)), script_timeout=launch_timeout)
  File "/Users/mwargers/.virtualenvs/zapion_test2/lib/python2.7/site-packages/marionette_driver-1.0.0-py2.7.egg/marionette_driver/marionette.py", line 1685, in execute_async_script
    rv = self._send_message("executeAsyncScript", body, key="value")
  File "/Users/mwargers/.virtualenvs/zapion_test2/lib/python2.7/site-packages/marionette_driver-1.0.0-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/Users/mwargers/.virtualenvs/zapion_test2/lib/python2.7/site-packages/marionette_driver-1.0.0-py2.7.egg/marionette_driver/marionette.py", line 716, in _send_message
    self._handle_error(resp)
  File "/Users/mwargers/.virtualenvs/zapion_test2/lib/python2.7/site-packages/marionette_driver-1.0.0-py2.7.egg/marionette_driver/marionette.py", line 770, in _handle_error
    raise errors.lookup(error)(message, stacktrace=stacktrace)
TEST-INFO took 98599ms

SUMMARY
-------
passed: 0
failed: 1
todo: 0

FAILED TESTS
-------
test_settings_media_storage_change.py test_settings_media_storage_change.TestSettingsMediaStorageChange.test_settings_media_storage_change
Created attachment 8678497 [details] [review]
[gaia] mwargers:1218115 > mozilla-b2g:master
(Assignee)

Comment 2

3 years ago
Comment on attachment 8678497 [details] [review]
[gaia] mwargers:1218115 > mozilla-b2g:master

This makes the test pass for me again.
Attachment #8678497 - Flags: review?(npark)
Attachment #8678497 - Flags: review?(jlorenzo)
Comment on attachment 8678497 [details] [review]
[gaia] mwargers:1218115 > mozilla-b2g:master

Okay for this workaround. We'll find a way of finding a suitable wait after an app is killed later.
Attachment #8678497 - Flags: review?(jlorenzo) → review+
Comment on attachment 8678497 [details] [review]
[gaia] mwargers:1218115 > mozilla-b2g:master

This workaround is good enough I think, but if you have time, instead of wait, how about if you check for the presence of Camera icon on homescreen after kill_all is completed? (I'm assuming the screen will go back to homescreen after killing the settings app)  Only concern is that perhaps later it might take more that 0.5 seconds.  But current fix is okay too, since the unit test does it the same way as well.
Attachment #8678497 - Flags: review?(npark) → review+
(Assignee)

Comment 5

3 years ago
Merged: https://github.com/mozilla-b2g/gaia/commit/5ce8bab88296f5c608acfe1f91c2098511120ee9
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.