Closed Bug 800800 Opened 12 years ago Closed 11 years ago

Ensure we always wait for removeAllHistory() in places.js to stop the failure 'Browsing History has been cleared'

Categories

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

defect

Tracking

(firefox18 fixed, firefox19 fixed, firefox20 fixed, firefox21 fixed, firefox-esr10 fixed, firefox-esr17 fixed)

RESOLVED FIXED
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed
firefox21 --- fixed
firefox-esr10 --- fixed
firefox-esr17 --- fixed

People

(Reporter: AndreeaMatei, Assigned: AndreeaMatei)

References

()

Details

(Whiteboard: [mozmill-test-failure][lib] s=121015 u=new c=places p=1)

Attachments

(1 file, 2 obsolete files)

It's already happening for the second time, on Windows XP with ESR 10.0.8 and now 10.0.9.

Details:
TimeoutError("Browsing History has been cleared")@resource://mozmill/modules/utils.js:449 waitFor([object Proxy],"Browsing History has been cleared")@resource://mozmill/modules/utils.js:487 

This is related to places.js module.
We are making use of the places method not only in that test, right? So I wonder why it works in other tests.
Priority: -- → P2
Whiteboard: [mozmill-test-failure][lib]
Looks like this only happens for release builds on esr10. Please ensure to use those builds and no nightly ones. I will put this in for next week.
Whiteboard: [mozmill-test-failure][lib] → [mozmill-test-failure][lib] s=121015 u=new c=tabbrowser p=1
Assignee: nobody → alex.lakatos
Status: NEW → ASSIGNED
(In reply to Andreea Matei [:AndreeaMatei] from comment #3)
> Has happened with testCheckItemHighlight.js also:
> 
> *
> http://mozmill-ci.blargon7.com/#/functional/
> failure?branch=All&platform=All&from=2012-10-
> 12&to=&test=%2FtestAwesomeBar%2FtestCheckItemHighlight.
> js&func=testCheckItemHighlight.js%3A%3AsetupModule
Given this, I think we should change the summary to reflect what we need to accomplish here: Ensure we always wait for removeAllHistory() in places.js
Summary: Test failure "Browsing History has been cleared" in /testAwesomeBar/testPasteLocationBar.js → Ensure we always wait for removeAllHistory() in places.js
Attached patch skipPatch v1.0 [esr10] (obsolete) — Splinter Review
I can not reproduce the issue with ESR 10.0.9 nor 10.0.10(candidate build1). The fail frequency was low, and in case you want to skip the failing tests, here is a skip patch. But I would advise against it, seeing as how nothing failed in the last 12 days.
I would propose closing this as WORKSFORME, and reopening if it fails again.
Attachment #675094 - Flags: review?(hskupin)
Attachment #675094 - Flags: review?(dave.hunt)
Comment on attachment 675094 [details] [diff] [review]
skipPatch v1.0 [esr10]

I do not think we want to skip it. If possible it should be investigated on the machine the failure happened. Also I would like to keep it open for now.
Attachment #675094 - Flags: review?(hskupin)
Attachment #675094 - Flags: review?(dave.hunt)
As Henrik suggests in comment 6, please try to replicate on the machine the failure is occurring on.
(In reply to Dave Hunt (:davehunt) from comment #7)
> As Henrik suggests in comment 6, please try to replicate on the machine the
> failure is occurring on.
It's happening on different machines and on different branches as well. The initial failure happens on mm-win-xp-3 and the recent failure happens on mm-win-xp-1
Other tests have started failing, but not frequently
http://mozmill-ci.blargon7.com/#/functional/failure?branch=All&platform=All&from=2012-10-30&to=&test=%2FtestAwesomeBar%2FtestSuggestHistory.js&func=testSuggestHistory.js%3A%3AsetupModule
Priority: P2 → P1
Assignee: alex.lakatos → andreea.matei
Blocks: 811407
No longer blocks: 811407
I believe what happens here is that over a functional testrun, not all the tests clear history in tearDown. Actually only those in awesomeBar do. 
I've noticed that the tests are not run alphabetically, in fact awesomeBar tests are somewhere at the end on the testrun. So they will have to remove all the history added until then.

We have several options: to increase the waitFor timeout, to clear history after each test or to see if we can redesign the method.
Andreea: It's true that there's no guarantee to the order the tests are run unless you use a manifest file, but as far as I can tell the awesomebar tests are being run early on the suite.

Could you try to replicate the issue using the manifest files and forcing the relevant tests to run last?
(In reply to Andreea Matei [:AndreeaMatei] from comment #9)
> I believe what happens here is that over a functional testrun, not all the
> tests clear history in tearDown. Actually only those in awesomeBar do. 
> I've noticed that the tests are not run alphabetically, in fact awesomeBar
> tests are somewhere at the end on the testrun. So they will have to remove
> all the history added until then.

That's only true for Linux but not for Windows and OS X. So on which platforms are we facing this bug?
Blocks: 813449
Whiteboard: [mozmill-test-failure][lib] s=121015 u=new c=tabbrowser p=1 → [mozmill-test-failure][lib] s=121015 u=new c=places p=1
On Windows XP is happening. I will look then to see how we can remove history otherwise or if we can wait for another event also.
Then your above idea is not the cause. On Windows the awesomebar tests are getting executed first. How much time do they take means which timeout do we need? Are you testing on a fully utilized machine?
I've managed to reproduce it constantly (at least once in 20 runs) with the builds from the mozmill-ci dashboard (ESR10 and default, not beta), on fully loaded XP vm.
The timeout needed not to fail in these conditions is 8000.
Does it happen when you run this test on its own too?
Nope, on single runs of different awesomebar tests it's not failing.
What's the minimum set of tests then? We really don't add that much to the history, so it's suspicious. What would you check next?
Can we please get this fixed soon? While Andreea is away someone else from the SV team should take care of it. This is a P1 failure. Thanks.
No longer depends on: 815605
This is our other P1 issue for this week. So please put focus on it so we can fix it. Seems like with the patch on bug 815605 it's failing constantly now.
OS: Windows XP → All
No longer blocks: 781547
Andreea, as given this should be fixed. I have landed the fix on bug 815605 on all other branches. So if nothing fails today please mark this bug as fixed.
No more failures. Will reopen if the case, hopefully not.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
The ESR10 link report has no failure now, just on the restart addons.

I checked the files from the report and it appears on esr17 the patch wasn't applied at the moment of the run:
http://hg.mozilla.org/qa/mozmill-tests/file/f25449c1ea43/lib/places.js
(In reply to Andreea Matei [:AndreeaMatei] from comment #25)
> I checked the files from the report and it appears on esr17 the patch wasn't
> applied at the moment of the run:
> http://hg.mozilla.org/qa/mozmill-tests/file/f25449c1ea43/lib/places.js

As far as I can see it has: http://hg.mozilla.org/qa/mozmill-tests/file/f25449c1ea43/lib/places.js#l104
The patch wasn't applied there, no failures today on ESR17, so marking as closed for now.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Reproducible on Nightly builds on XP SP3 - it happened in 12/21 in the test /testAwesomeBar/testAccessLocationBar.js
http://mozmill-ci.blargon7.com/#/functional/report/a11aa7b15f4e571fd6fe21a2dbbd2f40
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Has it been ever failed again since Dec 21st? If not please close this bug. It might be it was a fallout from the pb mode changes.
Summary: Ensure we always wait for removeAllHistory() in places.js → Ensure we always wait for removeAllHistory() in places.js to stop the failure 'Browsing History has been cleared'
(In reply to Henrik Skupin (:whimboo) from comment #29)
> Has it been ever failed again since Dec 21st? If not please close this bug.
> It might be it was a fallout from the pb mode changes.

Happened again on 2012-12-30 on Win XP on Aurora (fr)
http://mozmill-ci.blargon7.com/#/functional/report/23d8fbdd0190d4b0496d6b129f0bd5b4
Again on Nightly Win XP in the test:
/testAwesomeBar/testVisibleItemsMax.js
http://mozmill-ci.blargon7.com/#/functional/report/23d8fbdd0190d4b0496d6b129f5f03c1
Happened again on Firefox 19.0 (19.0, en-US, 20130109111322): 
http://mozmill-ci.blargon7.com/#/functional/report/23d8fbdd0190d4b0496d6b129fe8a608
I'm curious to see if this will fail again on the new system, since it's now happening only on Windows.
Until now, I can fix it only by increasing the timeout for the waitFor, so it could be a issue of slow machines.
Priority: P1 → P3
Looks like with the new machines this is not failing, for 3 weeks now, yey :)
So it's a sign for slowish operating machines then. We have a timeout of 5s right now, that's correct? We should probably increase that to 10s. What do you think?
When I was testing with increased timeout, 8-9 seconds did the trick. So yes, 10s should be safe enough. I will retest it and provide a patch.
Attached patch increase timeout (obsolete) — Splinter Review
Increasing timeout.
Applies to default, aurora and beta. Used to occur on esr10 as well but we're not working on that anymore.
Attachment #675094 - Attachment is obsolete: true
Attachment #709047 - Flags: review?(hskupin)
Attachment #709047 - Flags: review?(dave.hunt)
Comment on attachment 709047 [details] [diff] [review]
increase timeout

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

::: lib/places.js
@@ +134,4 @@
>      browserHistory.removeAllPages();
>      assert.waitFor(function () {
>        return finishedStateFlag;
> +    }, "Browsing History has been cleared", 10000, 100);

I would make this a global constant instead. Most likely we should also apply this to the other method which relies on the observer.
Attachment #709047 - Flags: review?(hskupin)
Attachment #709047 - Flags: review?(dave.hunt)
Attachment #709047 - Flags: review-
Attached patch increase timeoutSplinter Review
As talked on IRC, added another timeout for clearing history.
Attachment #709047 - Attachment is obsolete: true
Attachment #710572 - Flags: review?(hskupin)
Attachment #710572 - Flags: review?(dave.hunt)
Comment on attachment 710572 [details] [diff] [review]
increase timeout

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

http://hg.mozilla.org/qa/mozmill-tests/rev/781ed9c12364 (default)
Attachment #710572 - Flags: review?(hskupin)
Attachment #710572 - Flags: review?(dave.hunt)
Attachment #710572 - Flags: review+
Attachment #710572 - Flags: checkin+
Applies cleanly to all other branches.
Fingers crossed to never see the error again.
Keywords: checkin-needed
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: