Closed Bug 898568 Opened 12 years ago Closed 12 years ago

Test Failure "Suggestions Mozilla from Google and SAPO search providers are different - got 'false' " in /testSearch/testSearchSuggestions.js::testMultipleEngines

Categories

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

All
Linux
defect

Tracking

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

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

People

(Reporter: tracy, Assigned: cosmin-malutan)

Details

(Whiteboard: [mozmill-test-failure])

Attachments

(2 files, 7 obsolete files)

Assignee: nobody → cosmin.malutan
Status: NEW → ASSIGNED
Hardware: x86_64 → All
Is this reproducible for the affected locales?
Flags: needinfo?(cosmin.malutan)
I couldn't reproduce. Neither with it or cs locales.
Flags: needinfo?(cosmin.malutan)
K, so given that it happens with beta and release candidate builds, we might have to get this fixed. Setting as P2 for now.
Priority: -- → P2
Failed on cs: http://mozmill-release.blargon7.com/#/functional/report/3c3cd991de01b704f3f65783a153adb4 Different engine: Suggestions Mozilla from Google and Seznam search providers are different - got 'false'
Happened with Beta - en-GB locale, Linux Ubuntu 13.04: http://mozmill-release.blargon7.com/#/functional/report/dc3d4d2f66af31b9e75e291fa0f8010f Mario is trying to reproduce it on the same machine, no luck so far.
I tried to reproduce it on the failing machine most of the day with the same build but as Andreea said we had no luck in reproducing it. I have also tested it on my Ubuntu 12.04 without luck. http://mozmill-crowd.blargon7.com/#/functional/reports?branch=25.0&platform=Linux&from=2013-09-15&to=2013-09-18
Attached patch patch_v1.0 (obsolete) — Splinter Review
Hi, I investigated this bug and I got to conclusion that it failed because we weren't waiting for all suggestions but only for pop-up to open. On very fast machines it might update only one suggestion (like in this case) for both engines compared. In our case we searched for "Moz" and the first and only suggestion it was "Mozilla" for both search engines. // Message with only one suggestion: "Suggestions Mozilla from Google and SAPO search providers are different" // Message with more than one suggestion: "Suggestions mozilla firefox, mozilla, mozart, mozilla thunderbird, mozambique, mozy, mozzarella, moz, mozza, mozart requiem from Google and Yahoo search providers are different" I propose to wait for nsIAutoCompleteController search status to be completed. https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIAutoCompleteController Reports: http://mozmill-crowd.blargon7.com/#/functional/report/6ec6776efe900da3fd2b64a750d02880 http://mozmill-crowd.blargon7.com/#/functional/report/6ec6776efe900da3fd2b64a750d0378a http://mozmill-crowd.blargon7.com/#/functional/report/6ec6776efe900da3fd2b64a750d01c3b
Attachment #813459 - Flags: review?(andrei.eftimie)
Attachment #813459 - Flags: review?(andreea.matei)
Comment on attachment 813459 [details] [diff] [review] patch_v1.0 Review of attachment 813459 [details] [diff] [review]: ----------------------------------------------------------------- With the two changes made you get my r+. ::: lib/search.js @@ +414,5 @@ > */ > function searchBar(controller) { > this._controller = controller; > + this.autoCompleteCtrl = Cc["@mozilla.org/autocomplete/controller;1"]. > + getService(Ci.nsIAutoCompleteController); I like that! Great investigation, Cosmin. Only one thing I would like to see is that we cache the service globally in that module. Also please don't shorten Controller. @@ +715,2 @@ > assert.waitFor(function () { > + return popup.getNode().state === 'open' && Do we really have to wait for open? I think it would be enough to wait for the finished match.
Attachment #813459 - Flags: review?(andrei.eftimie)
Attachment #813459 - Flags: review?(andreea.matei)
Attachment #813459 - Flags: review-
Attached patch patch_v1.1 (obsolete) — Splinter Review
(In reply to Henrik Skupin (:whimboo) from comment #10) > Do we really have to wait for open? I think it would be enough to wait for > the finished match. From what I tested so far it works just fine if we wait only for the finished match, I don't expect to fail without it, if it will at some point I will add it back.
Attachment #813459 - Attachment is obsolete: true
Attachment #813497 - Flags: review?(hskupin)
Attachment #813497 - Flags: review?(andrei.eftimie)
Attachment #813497 - Flags: review?(andreea.matei)
Comment on attachment 813497 [details] [diff] [review] patch_v1.1 Review of attachment 813497 [details] [diff] [review]: ----------------------------------------------------------------- Landed as: http://hg.mozilla.org/qa/mozmill-tests/rev/b7ee0412fcf5 (default) Lets wait until Monday for backporting.
Attachment #813497 - Flags: review?(hskupin)
Attachment #813497 - Flags: review?(andrei.eftimie)
Attachment #813497 - Flags: review?(andreea.matei)
Attachment #813497 - Flags: review+
Attached patch fallowUp_default.patch (obsolete) — Splinter Review
By not waiting for pop-up state, I introduced a regression since caused those failures : http://mozmill-daily.blargon7.com/#/functional/report/6ec6776efe900da3fd2b64a750f07e77 http://mozmill-daily.blargon7.com/#/functional/report/6ec6776efe900da3fd2b64a750f0a852 Here is the fallow up patch to fix that.
Attachment #813735 - Flags: review?(andrei.eftimie)
Attachment #813735 - Flags: review?(andreea.matei)
Attached patch fallowUp_default.patch (obsolete) — Splinter Review
I changed the end(&&) by mistake because of the rush, sorry.
Attachment #813735 - Attachment is obsolete: true
Attachment #813735 - Flags: review?(andrei.eftimie)
Attachment #813735 - Flags: review?(andreea.matei)
Attachment #813737 - Flags: review?(andrei.eftimie)
Attachment #813737 - Flags: review?(andreea.matei)
Comment on attachment 813737 [details] [diff] [review] fallowUp_default.patch Review of attachment 813737 [details] [diff] [review]: ----------------------------------------------------------------- Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/2a1bbfc3033c (default) Hope this will do the trick.
Attachment #813737 - Flags: review?(andrei.eftimie)
Attachment #813737 - Flags: review?(andreea.matei)
Attachment #813737 - Flags: review+
Cosmin, as you mentioned earlier waiting for the popup open state is not necessary. Why do we have to re-introduce that check again?
It failed on testruns, it looks like when we type the second letter the search result is already in state 4, and it passes the assertion, the same as for further searches. So on the search for the next suggestion we need to check that is state is not already "complete" from the previous step. Waiting for pop-up to open it just delays the controller and it changes from State 4 to 3 on the second search. Dumps in assertion without waiting for open: >TEST-START | /Users/cosmin/Desktop/clean/mozmill-tests/tests/functional/testSearch/testSearchSuggestions.js | testMultipleEngines > > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 4TEST-UNEXPECTED-FAIL | /Users/cosmin/Desktop/clean/mozmill-tests/tests/functional/testSearch/testSearchSuggestions.js | testSearchSuggestions.js::testMultipleEngines Dumps in assertion when waiting for state to be different than 4, before assertion: > TEST-START | /Users/cosmin/Desktop/clean/mozmill-tests/tests/functional/testSearch/testSearchSuggestions.js | testMultipleEngines > > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 1 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 3 > autoCompleteController.searchStatus 2 > autoCompleteController.searchStatus 4TEST-PASS | /Users/cosmin/Desktop/clean/mozmill-tests/tests/functional/testSearch/testSearchSuggestions.js | testSearchSuggestions.js::testMultipleEngines
Comment on attachment 814046 [details] [diff] [review] fallow-up_2_default.patch Review of attachment 814046 [details] [diff] [review]: ----------------------------------------------------------------- As noted above, good find in using nsIAutoCompleteController instead of just waiting for the panel to be open. It would be great not to push several follow-up patches on issues. In most instances it would be better to test things through than to quickly push fixes. I like the approach, but please fix the comment noted below. Also another nit: it is "follow" not "fallow" ::: lib/search.js @@ +711,5 @@ > for (var i = 0; i < searchTerm.length; i++) { > try { > this.type(searchTerm[i]); > + > + // Check that is searching, so state is not already complete due to a previous search Please fix this comment. This phrase is broken and confusing. You can simplify it, just state what we are doing/waiting for: // Wait for the search to start Should probably suffice
Attachment #814046 - Flags: review?(andrei.eftimie)
Attachment #814046 - Flags: review?(andreea.matei)
Attachment #814046 - Flags: review-
Attached patch follow-up_2_default.patch (obsolete) — Splinter Review
(In reply to Andrei Eftimie from comment #19) > It would be great not to push several follow-up patches on issues. > In most instances it would be better to test things through than to quickly > push fixes. I will be more careful from now on, thanks. > Please fix this comment. This phrase is broken and confusing. > You can simplify it, just state what we are doing/waiting for: > > // Wait for the search to start > Should probably suffice Done that.
Attachment #814046 - Attachment is obsolete: true
Attachment #814344 - Flags: review?(andrei.eftimie)
Attachment #814344 - Flags: review?(andreea.matei)
Comment on attachment 814344 [details] [diff] [review] follow-up_2_default.patch Review of attachment 814344 [details] [diff] [review]: ----------------------------------------------------------------- Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/cf257bad98a3 (default) ps. you had the patch header twice, and the User field had encoded brackets around the email address, I fixed it. For backporting please merge all 3 landed patches into 1. Thanks
Attachment #814344 - Flags: review?(andrei.eftimie)
Attachment #814344 - Flags: review?(andreea.matei)
Attachment #814344 - Flags: review+
Attachment #814344 - Flags: checkin+
Comment on attachment 814371 [details] [diff] [review] patch_v2.0 aurora Review of attachment 814371 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/search.js @@ +716,4 @@ > assert.waitFor(function () { > + return autoCompleteController.searchStatus === > + autoCompleteController.STATUS_SEARCHING; > + }, "", TIMEOUT_REQUEST_SUGGESTIONS); I really hope we do not miss that status given that we have a 100ms timeout for the checks. If search has been finished in-between, we will timeout here.
Hi Gavin, I tried to catch an event from nsIAutoCompleteController to know when the search starts and ends, because if we are watching searchStatus attribute this might change to fast and our assertion will fail. Do you know how we could catch the event that's causing the searchStatus attribute to change ? Or do you know another way we could get announced that the search has been completed ?
Flags: needinfo?(gavin.sharp)
Comment on attachment 814371 [details] [diff] [review] patch_v2.0 aurora I'm taking the review flags out since we might change things on default, in that case we'll need another patch to backport.
Attachment #814371 - Flags: review?(andrei.eftimie)
Attachment #814371 - Flags: review?(andreea.matei)
I think there aren't any great ways to observe autocomplete behavior as it is. Polling as those patches do is likely to be flaky, particularly if the polling interval isn't low enough. The autocomplete input binding offers searchbegin/searchcomplete pseudo-event handlers, but there can only be one specified using the "onsearchbegin" or "onsearchcomplete" attributes, which isn't ideal (and risks breaking other stuff if you use it for these tests and we then try to use it it again in-browser). We could improve that situation if you wanted to file a bug and suggest a more robust way to be notified of these types of state changes.
Flags: needinfo?(gavin.sharp)
We should backout the followup that created 2 waitFors for now until we find a better solution, as we are still failing in bug 862687, cause we never get to the second waitFor. http://hg.mozilla.org/qa/mozmill-tests/rev/df1a8418ed67 (default) Switching back to affected as this is just a workaround and we want a better solution.
I haven't used MutationObservers yet that much, but would one of those help us here? That way we wouldn't miss a change of a property.
Hi whimboo, I looked in to this today, and the only thing that we can watch with MutationObsever is if pop-up is open, but for that we have state attribute. I would say that this is fixed on nightly as it did't failed again since we wait for state "open" again too. The initial issue it was that after the pop-up opened we did't waited for a full update, something that we do now. As for waiting for a new search to start, this is already implemented (in getSuggestions method, we wait for pop-up to open get suggestions, clear, and wait for pop-up to close). If it won't fail again on nightly over the weekend I will make a backport patch and reports for the remaining branches.
Here is the patch for Aurora as I said. It did't fail on Nightly, so I say it's safe to rely on suggestions pop-up state (open/close) for determining a new search, and on nsIAutoCompleteController, that all suggestions have been appended. So we will not fail with only one suggestion. Reports: http://mozmill-crowd.blargon7.com/#/functional/report/bb6e314abd8f1e30e8af61ecd4ae5d6c http://mozmill-crowd.blargon7.com/#/functional/report/bb6e314abd8f1e30e8af61ecd4a8aa56 http://mozmill-crowd.blargon7.com/#/functional/report/bb6e314abd8f1e30e8af61ecd4af9017
Attachment #814344 - Attachment is obsolete: true
Attachment #814371 - Attachment is obsolete: true
Attachment #820875 - Flags: review?(andrei.eftimie)
Attachment #820875 - Flags: review?(andreea.matei)
Comment on attachment 820875 [details] [diff] [review] patch_v2.1_aurora.patch Review of attachment 820875 [details] [diff] [review]: ----------------------------------------------------------------- So we seem to be green on Nightly with the current version. Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/f9780d14879d (mozilla-aurora)
Attachment #820875 - Flags: review?(andrei.eftimie)
Attachment #820875 - Flags: review?(andreea.matei)
Attachment #820875 - Flags: review+
Attachment #820875 - Flags: checkin+
Cosmin, before checking ESR17 we still need this on 25 and ESR24 And I don't think we're going to push any more changes to ESR17.
Comment on attachment 824083 [details] [diff] [review] patch_v2.1_esr17 Review of attachment 824083 [details] [diff] [review]: ----------------------------------------------------------------- Marking ESR17 as WONTFIX, we are not longer pushing anything to that branch.
Attachment #824083 - Flags: review?(andrei.eftimie)
Attachment #824083 - Flags: review?(andreea.matei)
Attachment #824083 - Flags: review-
Only 1 thing remaining, please check ESR24, then we can close this bug.
Great, transplanted to esr24: http://hg.mozilla.org/qa/mozmill-tests/rev/6dcbce2999fe (mozilla-esr24) We're all done here, Thanks Cosmin.
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

Created:
Updated:
Size: