Closed Bug 1068724 Opened 10 years ago Closed 10 years ago

Fix failure in test_cost_control_reset_wifi.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, Unassigned)

Details

Attachments

(2 files)

Test test_cost_control_reset_wifi.py is failing on latest master: http://jenkins1.qa.scl3.mozilla.com/job/flame-319.mozilla-central.ui.functional.non-smoke/164/HTML_Report/
When launching Usage app for the second time, the page is not completely loaded, we need to wait for another ~2 secondes.
We should update our test to wait for that.

Traceback (most recent call last):
File "/var/jenkins/2/workspace/flame-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/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/cost_control/test_cost_control_reset_wifi.py", line 40, in test_cost_control_reset_wifi
cost_control.launch()
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 27, in launch
self.app = self.apps.launch(self.name, self.manifest_url, self.entry_point, launch_timeout=launch_timeout)
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 65, in launch
result = self.marionette.execute_async_script("GaiaApps.launchWithName('%s')" % name, script_timeout=launch_timeout)
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/marionette.py", line 1252, in execute_async_script
filename=os.path.basename(frame[0]))
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/decorators.py", line 35, in _
return func(*args, **kwargs)
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/marionette.py", line 638, in _send_message
self._handle_error(response)
File "/var/jenkins/2/workspace/flame-319.mozilla-central.ui.functional.non-smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.8.4-py2.7.egg/marionette/marionette.py", line 700, in _handle_error
raise errors.ScriptTimeoutException(message=message, status=status, stacktrace=stacktrace)
ScriptTimeoutException: ScriptTimeoutException: timed out

Device firmware (date) 	16 Jun 2014 01:51:29
Device firmware (incremental) 	109
Device firmware (release) 	4.3
Device identifier 	flame
Gaia date 	14 Sep 2014 23:17:06
Gaia revision 	855be6ade407
Gecko build 	20140915160203
Gecko revision 	02c3915bf742
Gecko version 	35.0a1
I've been working on investigating this issue, and the test is failing during launch, at this step: https://github.com/mozilla-b2g/gaia/blob/master/tests/atoms/gaia_apps.js#L290

That's because the src of the Usage app takes the last location I navigated to in the Cost Control app. 
So GaiaApps.getDisplayedApp().src == 'app://costcontrol.gaiamobile.org/index.html#datausage-tab', while 
 (origin + launchPath) ==  'app://costcontrol.gaiamobile.org/index.html'

As the condition we wait for is false(GaiaApps.getDisplayedApp().src == (origin + launchPath);), the test is timing out. 

I can fix this issue by killing the Usage app before launching it for the second time.
I will open a PR with that.
Summary: Update test_cost_control_reset_wifi.py to wait for page to be loaded when launching Usage app for the 2nd time → Fix failure in test_cost_control_reset_wifi.py
Attachment #8491474 - Flags: review?(zcampbell)
Attachment #8491474 - Flags: review?(robert.chira)
Attachment #8491474 - Flags: review?(florin.strugariu)
Comment on attachment 8491474 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/24180

r+, but please file the bug about the atom too.
Attachment #8491474 - Flags: review?(zcampbell) → review+
Attachment #8491474 - Flags: review?(florin.strugariu) → review+
Leaving this open until Zac's request is addressed
Flags: needinfo?(viorela.ioia)
Attachment #8491474 - Flags: review?(robert.chira) → review+
I opened Bug 1070949
Flags: needinfo?(viorela.ioia)
PR for v2.1
Attachment #8493136 - Flags: review?(robert.chira)
Attachment #8493136 - Flags: review?(florin.strugariu)
Attachment #8493136 - Flags: review?(robert.chira)
Attachment #8493136 - Flags: review?(florin.strugariu)
Attachment #8493136 - Flags: review+
https://github.com/mozilla-b2g/gaia/commit/da5f16cd022c2bed89fa6a7eb6efb7122cf5f1c9
Status: NEW → RESOLVED
Closed: 10 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: