Closed Bug 968150 Opened 10 years ago Closed 10 years ago

Investigate intermittent "test_sms_to_dialer" fail

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: AndreiH, Assigned: zcampbell)

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
Bebe
: review+
Details | Review
I could reproduce this locally, when running the test locally the Messages app sometimes does not launch.

Traceback (most recent call last):
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/.env/local/lib/python2.7/site-packages/marionette_client-0.7.3-py2.7.egg/marionette/marionette_test.py", line 143, in run
testMethod()
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_to_dialer.py", line 24, in test_dialer_from_message
self.messages.launch()
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/tests/python/gaia-ui-tests/gaiatest/apps/messages/app.py", line 18, in launch
Base.launch(self)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 27, in launch
self.app = self.apps.launch(self.name, launch_timeout=launch_timeout)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 91, in launch
self.switch_to_frame(app.frame_id, url)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 157, in switch_to_frame
self.marionette.switch_to_frame(app_frame)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/.env/local/lib/python2.7/site-packages/marionette_client-0.7.3-py2.7.egg/marionette/marionette.py", line 882, in switch_to_frame
response = self._send_message('switchToFrame', 'ok', element=frame.id, focus=focus)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.2/.env/local/lib/python2.7/site-packages/marionette_client-0.7.3-py2.7.egg/marionette/marionette.py", line 595, in _send_message
raise TimeoutException(message='socket.timeout', status=ErrorCodes.TIMEOUT, stacktrace=None)
TimeoutException: TimeoutException: socket.timeout
Assignee: nobody → andrei.hutusoru
This seems kinda strange. The Messages app sometimes is successfully launched and sometimes it's not.
I think  the test is moving fast, if I put a sleep here [1], the test always passes

[1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/messages/test_sms_to_dialer.py#L16
I think " GaiaDataLayer.sendSMS(%s, %s) " is executed to fast, before the phone could properly startup
When an SMS is received, if the Messages app is not open it is opened by the System.

It's possibly a race between the two.

If you shuffle the order between sending the SMS and opening the Message app it might stabilise.
(In reply to [:AndreiH] from comment #2)
> I think " GaiaDataLayer.sendSMS(%s, %s) " is executed to fast, before the
> phone could properly startup

When you saw it locally was the SMS received?
The notification of receiving a message is not displayed only after I open the Message app. Even tried with several sms and only after I Messages app is opened all the notifications are displayed
All I mean is that if GaiaDataLayer.sendSMS still worked and sent the SMS then it did not execute too fast.
I debugged this a bit more and I think that Marionette is tapping on the element before it has its click handler added:
https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/js/contacts.js#L630

If you view the logcat when it fails you see in the logs that Marionette taps on the button but on the device you see nothing happens.

However I'm not sure what to wait for just yet.
Assignee: andrei.hutusoru → zcampbell
Attached file github pr
Attachment #8377089 - Flags: review?(robert.chira)
Attachment #8377089 - Flags: review?(florin.strugariu)
Comment on attachment 8377089 [details] [review]
github pr

R- because of the missing import
Attachment #8377089 - Flags: review?(florin.strugariu) → review-
Comment on attachment 8377089 [details] [review]
github pr

r? again :)
Attachment #8377089 - Flags: review- → review?(florin.strugariu)
Attachment #8377089 - Flags: review?(florin.strugariu) → review+
merged in:
https://github.com/mozilla-b2g/gaia/commit/5db034fc7aefd7b592ce1546c4da9ac2fc517e74
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Attachment #8377089 - Flags: review?(robert.chira)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: