[Contacts] Intermitent test in navigation



5 years ago
5 years ago


(Reporter: arcturus, Assigned: julienw)




Firefox Tracking Flags

(b2g-v1.4 affected, b2g-v2.0 ?)



(1 attachment)

The following test is intermitent in travis:


 1) [communications-contacts] contacts/navigation should send show-navbar to dialer when leaving view-contact-form:

TypeError: Attempted to wrap undefined property postMessage as function

at wrapMethod (http://communications.gaiamobile.org:8080/common/vendor/sinon/sinon.js:522:1)

at spy (http://communications.gaiamobile.org:8080/common/vendor/sinon/sinon.js:1080:9)

at spy (http://communications.gaiamobile.org:8080/common/vendor/sinon/sinon.js:2490:13)

at (anonymous) (http://communications.gaiamobile.org:8080/contacts/test/unit/navigation_test.js:277:9)

at wrapper (http://communications.gaiamobile.org:8080/common/test/mocha_generators.js:62:13)

at run (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709:7)

at runTest (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4087:5)

at (anonymous) (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4133:7)

at next (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4013:7)

at (anonymous) (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4022:7)

at next (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3970:16)

at (anonymous) (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3990:5)

at (anonymous) (http://communications.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4938:28)
Jose could you take a look?

Flags: needinfo?(jmcf)

Comment 2

5 years ago
Note that this is in v1.4.
status-b2g-v1.4: --- → affected
status-b2g-v2.0: --- → ?
Keywords: intermittent-failure

Comment 3

5 years ago
Travis is permared on v1.4 because of this, Francisco, can you please backout whatever did this?
Flags: needinfo?(francisco)
Germán will be taking a look this morning. If we don't find a quick fix I would suggest we skip that test
Flags: needinfo?(jmcf)
What's the status for this?
Flags: needinfo?(francisco) → needinfo?(gtorodelvalle)

Comment 6

5 years ago
First failing Travis build is https://travis-ci.org/mozilla-b2g/gaia/jobs/26181184

It's completely unrelated so IMO this shows that there is probably a Firefox change. Maybe we should fetch the correct Firefox version for this branch? I filed a separate bug for this: bug 1018896.

But I'd like to know why this does not fail in master? Is the test different?
Taking a look to this, 1.4 shouldn't be red :(
Assignee: nobody → francisco

Comment 8

5 years ago
So, same Firefox, v1.4 fails, master works.

I added logs in both tests that spy on window.parent.postMessage, and...

* in master, window.parent.postMessage is always null: in both tests, before and after the spying
* in v1.4, window.parent.postMessage is "normal" before the first spy, then it's a sinon spy after the first spy (in the first test); then it's undefined in the second test before the second spy.

I also added logs in test-agent's sinon_helper.js on v1.4, and I saw that window.parent.postMessage turns to "undefined" after restoring sinon's sandbox.

I don't see what changed in https://travis-ci.org/mozilla-b2g/gaia/jobs/26181184
However, we have different sinon versions between 1.4 and master, so I'll try this now.

Comment 9

5 years ago
upgrading sinon seems to work, I'll prepare a PR.

Comment 10

5 years ago
Created attachment 8436479 [details] [review]
github PR

Let's see how Travis like this before requesting a review.

I _still_ don't know what changed to make this red, though.
Assignee: francisco → felash
Flags: needinfo?(gtorodelvalle)

Comment 11

5 years ago
Fixed by uplifting bug 995425

(I don't know what the main issue was, and I don't really care)
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.