Closed Bug 935474 Opened 12 years ago Closed 12 years ago

Test failure 'controller.waitForPageLoad(): Timeout waiting for page loaded.' in testBookmarks_OpenAllInTabs/test1.js

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect, P1)

defect

Tracking

(firefox25 fixed, firefox26 fixed, firefox27 fixed, firefox28 fixed, firefox-esr17 fixed, firefox-esr24 fixed)

RESOLVED FIXED
Tracking Status
firefox25 --- fixed
firefox26 --- fixed
firefox27 --- fixed
firefox28 --- fixed
firefox-esr17 --- fixed
firefox-esr24 --- fixed

People

(Reporter: andrei, Assigned: andrei)

References

()

Details

(Keywords: reproducible, Whiteboard: [mozmill-test-failure])

Attachments

(2 files, 1 obsolete file)

Module: testOpenAllBookmarksInTabs Test: testBookmarks_OpenAllInTabs/test1.js Failure: controller.waitForPageLoad(): Timeout waiting for page loaded. Branches: default Platforms: OSX Only affects mozmill 2.0, mozmill 1.5 works fine. Marking as P1 since it has a 100% reproducible rate (at least on OSX). We should try getting this fixed before we start running 2.0 in ci. Here is an example report: http://mozmill-crowd.blargon7.com/#/endurance/report/d17690a112360a2b3155acaa276f1bac
Is this a regression? We haven't seen this before. Can you work on this bug Andrei?
Checking if its a mozmill or a mozmill-tests issue
Assignee: nobody → andrei.eftimie
Status: NEW → ASSIGNED
We fail in the closeAllTabs() method: http://hg.mozilla.org/qa/mozmill-tests/file/7d43ed60222f/lib/tabs.js#l164 > this._controller.open(this._controller.window.BROWSER_NEW_TAB_URL); > this._controller.waitForPageLoad();
Hope this would go away with the recent changes to open/close tabs from bug 890181 (which hasn't landed yet), but the problem persists with that patch applied.
Andrei, is that failure fixed now?
Flags: needinfo?(andrei.eftimie)
I can still reproduce this. I'll work to figure this out now.
Flags: needinfo?(andrei.eftimie)
We fail in closeAllTabs() while waiting for the 'about:blank' page to load. > * current map: {"3":{"loaded":true},"7":{"loaded":true,"id_load_in_transition":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true},"id_load_handled":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true}}} > ** Page has been finished loading: id=7, status=false, uuid={1e92f596-8571-ac4f-a137-502b03118802} > *** 'pagehide' event: id=7, baseURI=about:newtab > * current map: {"3":{"loaded":true},"7":{"loaded":false,"id_load_in_transition":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true},"id_load_handled":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true}}} > * current map: {"3":{"loaded":true},"7":{"loaded":false,"id_load_in_transition":{"name":"","number":"{b87d84f5-fd7d-af4b-bae3-df50255b2117}","valid":true},"id_load_handled":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true}}} > *** Page status updated: id=7, loaded=false, uuid={b87d84f5-fd7d-af4b-bae3-df50255b2117} > *** 'DOMContentLoaded' event: id=7, baseURI=about:newtab > *** 'pageshow' event: id=7, baseURI=about:newtab > * current map: {"3":{"loaded":true},"7":{"loaded":true,"id_load_in_transition":{"name":"","number":"{b87d84f5-fd7d-af4b-bae3-df50255b2117}","valid":true},"id_load_handled":{"name":"","number":"{1e92f596-8571-ac4f-a137-502b03118802}","valid":true}}} > *** Page status updated: id=7, loaded=true, uuid={b87d84f5-fd7d-af4b-bae3-df50255b2117} > * current map: {"3":{"loaded":true},"7":{"loaded":true,"id_load_in_transition":{"name":"","number":"{b87d84f5-fd7d-af4b-bae3-df50255b2117}","valid":true},"id_load_handled":{"name":"","number":"{b87d84f5-fd7d-af4b-bae3-df50255b2117}","valid":true}}} > ** Page has been finished loading: id=7, status=true, uuid={b87d84f5-fd7d-af4b-bae3-df50255b2117} > ** Page has been finished loading: id=7, status=false, uuid={b87d84f5-fd7d-af4b-bae3-df50255b2117} > ** Page has been finished loading: id=7, status=false, uuid={b87d84f5-fd7d-af4b-bae3-df50255b2117}
Attached file testcase.js (obsolete) —
I've reduced this failure to the attached testcase. We basically come down to calling waitForPageLoad() twice for the same page. This is due to a combination between waitForPageLoad() and closeAllTabs() This fails in 2.0 but passes in 1.5 I'll look into what has caused this. Bug 885221 might be the culprit https://github.com/mozilla/mozmill/commit/05f859f618fb89f789d0c12fd1574f09e98fa0e9
Well, this is case on the mozmill 2.0 codebase since at least early 2011. The question is: Should this fail or not? > controller.waitForPageLoad(); > controller.waitForPageLoad(); I agree that we shouldn't have these calls in our tests, we do end up calling waitForPageLoad() on the same page twice in the case of this particular failure. Should: 1) we amend the test (or lib) so this doesn't happen 2) mozmill be able to handle this gracefully?
Flags: needinfo?(hskupin)
Flags: needinfo?(dave.hunt)
(In reply to Andrei Eftimie from comment #10) > Should this fail or not? > > controller.waitForPageLoad(); > > controller.waitForPageLoad(); > > I agree that we shouldn't have these calls in our tests, we do end up > calling waitForPageLoad() on the same page twice in the case of this > particular failure. This code example is invalid and should never been used, right! You cannot call it twice without having any unload in between. > 2) mozmill be able to handle this gracefully? No. That is against the design decisions.
Flags: needinfo?(hskupin)
Flags: needinfo?(dave.hunt)
Attached patch 1.patchSplinter Review
I've found and fixed the real issue. We were getting to the point of calling waitForPageLoad() on the same page ('about:blank') because on subsequent iterations we would fail clicking on the `testFolder` - the new pages would fail opening, and we would check the first tab again. Both the `testFolder` and the `openAllInTabs` are chrome elements, so we can safely retrieve them before the endurance loop. This should also improve performance a bit (probably not by any significant mean).
Attachment #8339901 - Attachment is obsolete: true
Attachment #8340250 - Flags: review?(andreea.matei)
Comment on attachment 8340250 [details] [diff] [review] 1.patch Review of attachment 8340250 [details] [diff] [review]: ----------------------------------------------------------------- Looks right. Not sure if it's not worth investigating further why this happens only with 2.0. But landed: http://hg.mozilla.org/qa/mozmill-tests/rev/ae5afd539ab8 (default)
Attachment #8340250 - Flags: review?(andreea.matei) → review+
Attached patch esr17_1.patchSplinter Review
Applies cleanly to all branches except ESR17 for which the attached patch is for.
Attachment #8340335 - Flags: review?(andreea.matei)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: