Closed Bug 1151786 Opened 4 years ago Closed 4 years ago

Intermittent testOfflinePage | testOfflinePage.js - Services.io.offline is true. - See following stack:

Categories

(Firefox for Android :: General, defect)

x86
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 41
Tracking Status
firefox39 --- fixed
firefox40 --- fixed
firefox41 --- fixed
firefox-esr31 --- unaffected
firefox-esr38 --- unaffected

People

(Reporter: cbook, Assigned: mfinkle)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Android armv7 API 9 mozilla-inbound opt test robocop-3

https://treeherder.mozilla.org/logviewer.html#?job_id=8521445&repo=mozilla-inbound

03:40:00 WARNING - TEST-UNEXPECTED-FAIL | testOfflinePage | testOfflinePage.js - Services.io.offline is true. - See following stack:
:mfinkle - This has become quite a frequent failure; can you have a look?
Flags: needinfo?(mark.finkle)
(In reply to Treeherder Robot from comment #104)
> log: https://treeherder.mozilla.org/logviewer.html#?repo=mozilla-inbound&job_id=9783624

8:51:58     INFO -  TEST-START | testOfflinePage
08:51:58     INFO -  TEST-PASS | testOfflinePage | Robocop tests need the test device screen to be powered on. - 
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"type":"Gecko:Ready"} - Gecko:Ready should equal Gecko:Ready
08:51:58     INFO -  EventExpecter: no longer listening for Gecko:Ready
08:51:58     INFO -  Registered listener for Robocop:JS
08:51:58     INFO -  Loading JavaScript test from http://mochi.test:8888/tests/robocop/robocop_javascript.html?slug=1431443958168&path=testOfflinePage.js
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | (xpcshell\/head.js) | test 1 pending\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  (xpcshell/head.js) | test 1 pending
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | (xpcshell\/head.js) | test 2 pending\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  (xpcshell/head.js) | test 2 pending
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | testOfflinePage.js | Starting setup_browser","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | Starting setup_browser
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | (xpcshell\/head.js) | test 3 pending\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  (xpcshell/head.js) | test 3 pending
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | (xpcshell\/head.js) | test 3 finished\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  (xpcshell/head.js) | test 3 finished
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-UNEXPECTED-FAIL | testOfflinePage.js | Services.io.offline is true. - See following stack:\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58  WARNING -  TEST-UNEXPECTED-FAIL | testOfflinePage | testOfflinePage.js - Services.io.offline is true. - See following stack:
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"JS frame :: robocop_head.js :: do_throw :: line 471\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | JS frame :: robocop_head.js :: do_throw :: line 471
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"JS frame :: robocop_head.js :: do_report_result :: line 573\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | JS frame :: robocop_head.js :: do_report_result :: line 573
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"JS frame :: testOfflinePage.js :: ok :: line 14\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | JS frame :: testOfflinePage.js :: ok :: line 14
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"JS frame :: testOfflinePage.js :: errorListener :: line 72\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | JS frame :: testOfflinePage.js :: errorListener :: line 72
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  testOfflinePage.js | native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
08:51:58     INFO -  TEST-PASS | testOfflinePage | Given message occurred for registered event: {"message":"\nTEST-INFO | (xpcshell\/head.js) | exiting test\n","innerType":"progress","type":"Robocop:JS"} - Robocop:JS should equal Robocop:JS
08:51:58     INFO -  (xpcshell/head.js) | exiting test
08:51:58     INFO -  EventExpecter: no longer listening for Robocop:JS
08:51:58     INFO -  Unregistered listener for Robocop:JS
08:51:58     INFO -  TEST-OK | testOfflinePage | took 119263ms
08:51:58     INFO -  TEST-START | Shutdown
08:51:58     INFO -  Passed: 14
08:51:58     INFO -  Failed: 1
If I had to guess, I would say that Services.io.offline is not changing fast enough, before we attempt to move on - expecting the offline state to be different.

So, we should wait for some notification after changing the offline state.

We should probably use an observer like this:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/test/general/browser_bug435325.js#59
Flags: needinfo?(mark.finkle)
Mark, this is happening with pretty high frequency. Can you please take a look or assign someone else to?
Flags: needinfo?(mark.finkle)
Attached patch offline-fixes v0.1 (obsolete) — Splinter Review
I converted the test to be a "task" and added helpers for yielding on browser events and offline notifications.

This works fine locally and is green so far on Try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b260c2620809
Assignee: nobody → mark.finkle
Flags: needinfo?(mark.finkle)
Attachment #8607822 - Flags: review?(margaret.leibovic)
I tweaked the test a little. It seems like | Services.io.offline | is not very reliable. That's fine, we don't care. The test is about the offline error page and we do continue to test those.

Looking very green:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d11341031618
Attachment #8607822 - Attachment is obsolete: true
Attachment #8607822 - Flags: review?(margaret.leibovic)
Attachment #8608283 - Flags: review?(margaret.leibovic)
Comment on attachment 8608283 [details] [diff] [review]
offline-fixes v0.2

Review of attachment 8608283 [details] [diff] [review]:
-----------------------------------------------------------------

Nice listener cleanup.
Attachment #8608283 - Flags: review?(margaret.leibovic) → review+
https://hg.mozilla.org/mozilla-central/rev/578171db6c9d
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
You need to log in before you can comment on or make changes to this bug.