Closed Bug 685854 Opened 14 years ago Closed 13 years ago

Failure in /testSearch/testOpenSearchAutodiscovery.js | controller.assertJS: Failed for 'subject.installableEngines.length == 1'

Categories

(Mozilla QA Graveyard :: Mozmill Tests, defect)

All
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: remus.pop, Assigned: remus.pop)

References

()

Details

(Whiteboard: [mozmill-test-failure][mozmill-test-skipped])

Attachments

(4 files, 4 obsolete files)

TEST: testOpenSearchAutodiscovery.js::testOpenSearchAutodiscovery ERROR: controller.assertJS: Failed for 'subject.installableEngines.length == 1' WHEN: 2011-09-09 FIRST: 2011-08-26 BRANCHES: default, aurora, beta, release
Attached patch patch 1st assertJS (obsolete) — Splinter Review
Changed the first assertJS.
Attachment #559460 - Flags: review?(hskupin)
Assignee: nobody → remus.pop
Status: NEW → ASSIGNED
Comment on attachment 559460 [details] [diff] [review] patch 1st assertJS Please always replace all existent assertJS calls when you on it already.
Attachment #559460 - Flags: review?(hskupin) → review-
Comment on attachment 559460 [details] [diff] [review] patch 1st assertJS Just a reminder, if a patch is ready for review between 7am and 7pm PDT, please use me as the reviewer; this will allow Henrik to work on his projects. Henrik should only be used for review when I am not available. >- controller.assertJS("subject.installableEngines.length == 1", >- {installableEngines: addEngines}); >+ expect.equal(addEngines.length, 1, "Autodiscovered OpenSearch Engines"); > I think this should be an assert instead of an expect. We can't install an engine if one is not discovered.
Attached patch patch assertions (obsolete) — Splinter Review
Patched both assertions to reflect the new assertions API.
Attachment #559460 - Attachment is obsolete: true
Attachment #559469 - Flags: review?(hskupin)
Attached patch patch assertions (obsolete) — Splinter Review
r? Anthony
Attachment #559469 - Attachment is obsolete: true
Attachment #559469 - Flags: review?(hskupin)
Attachment #559470 - Flags: review?(anthony.s.hughes)
Comment on attachment 559470 [details] [diff] [review] patch assertions > var addEngines = searchBar.installableEngines; >- controller.assertJS("subject.installableEngines.length == 1", >- {installableEngines: addEngines}); >+ expect.equal(addEngines.length, 1, "Autodiscovered OpenSearch Engines"); I think this should be an assert not an expect since we can't do the rest of the test if an Open Search engine is not found. >- controller.assertJS("subject.placeholder == subject.engineName", { >- placeholder: inputField.getNode().placeholder, >- engineName: SEARCH_ENGINE.name >- }); >+ expect.equal(inputField.getNode().placeholder, SEARCH_ENGINE.name, "Selected search engine"); This one is fine because there is no code following which depends on a TRUE state.
Attachment #559470 - Flags: review?(anthony.s.hughes) → review-
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #6) > >- controller.assertJS("subject.placeholder == subject.engineName", { > >- placeholder: inputField.getNode().placeholder, > >- engineName: SEARCH_ENGINE.name > >- }); > >+ expect.equal(inputField.getNode().placeholder, SEARCH_ENGINE.name, "Selected search engine"); > > This one is fine because there is no code following which depends on a TRUE > state. Whereby the message should be "New engine is selected, and its name displayed as placeholder".
Used assert for the first assertion.
Attachment #559470 - Attachment is obsolete: true
Attachment #559844 - Flags: review?(hskupin)
Attachment #559844 - Flags: review?(hskupin) → review?(anthony.s.hughes)
Comment on attachment 559844 [details] [diff] [review] patch assertions v2 [checked-in] This looks fine to me. I'll have to check it in later since I'm not near my laptop right now.
Attachment #559844 - Flags: review?(anthony.s.hughes) → review+
Keywords: checkin-needed
Attachment #559844 - Attachment description: patch assertions v2 → patch assertions v2 [checked-in]
Please mark VERIFIED if this failure is no longer present in tomorrow's results; reopen otherwise. Thanks.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
This patch does not fix the failure. It's just for getting more information about the currently happening failure in installing the search engine. Reopening the bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to Henrik Skupin (:whimboo) from comment #12) > This patch does not fix the failure. It's just for getting more information > about the currently happening failure in installing the search engine. > Reopening the bug. My bad, thanks.
Attached patch skip test (obsolete) — Splinter Review
Skips the test.
Attachment #563349 - Flags: review?(alex.lakatos)
So do we have any new information here since the last check-in happened? See my comment 12.
No more info Henrik. It seems it cannot find the search engine in the drop-down popup. I would really like to see this reproduced and exactly see what happens.
Comment on attachment 563349 [details] [diff] [review] skip test We usually add a comment before skipping the test. Use: >// XXX: Bug 685854 - Failure in /testSearch/testOpenSearchAutodiscovery.js | >// controller.assertJS: Failed for 'subject.installableEngines.length == 1' >+setupModule.__force_skip__ = "Bug 685854 - Failure in /testSearch/testOpenSearchAutodiscovery.js " + >+ "| controller.assertJS: Failed for 'subject.installableEngines.length == 1'"; >+teardownModule.__force_skip__ = "Bug 685854 - Failure in /testSearch/testOpenSearchAutodiscovery.js " + >+ "| controller.assertJS: Failed for 'subject.installableEngines.length == 1'";
Attachment #563349 - Flags: review?(alex.lakatos) → review-
(In reply to Remus Pop (:RemusPop) from comment #16) > No more info Henrik. It seems it cannot find the search engine in the > drop-down popup. > I would really like to see this reproduced and exactly see what happens. Are we using the referenced search engine in a search test which gets executed ahead? Probably we do not correctly clean-up the installed engines. Can you please check?
(In reply to Alex Lakatos from comment #17) > We usually add a comment before skipping the test. Use: I don't think we have to. All the information is already included in the skip lines.
> Are we using the referenced search engine in a search test which gets > executed ahead? Probably we do not correctly clean-up the installed engines. > Can you please check? This is the only test in which we use that engine. Keep in mind that this happens only on win2k.
(In reply to Henrik Skupin (:whimboo) from comment #19) > I don't think we have to. All the information is already included in the > skip lines. In our repo, except conditional skips, all have a comment, even though it's the same as the skip message. If we want to be consistent, we either should add one here or remove the others in a separate bug.
Attachment #563349 - Attachment is obsolete: true
Attachment #563402 - Flags: review?(alex.lakatos)
Attachment #563402 - Attachment is patch: true
(In reply to Remus Pop (:RemusPop) from comment #20) > This is the only test in which we use that engine. Keep in mind that this > happens only on win2k. Anthony, can you please do a quick test for this test and the whole folder, just to check if it is easily reproducable? Would be great.
http://mozmill-crowd.brasstacks.mozilla.com/#/functional/report/18fd2c24fc56c33feb3c8a50f4ed5458 http://mozmill-crowd.brasstacks.mozilla.com/#/functional/report/18fd2c24fc56c33feb3c8a50f4ed6917 http://mozmill-crowd.brasstacks.mozilla.com/#/functional/report/18fd2c24fc56c33feb3c8a50f4ed9a82 I have set up a win2k machine to run the functional testrun. I could not reproduce this issue. Above are the results with 0 fails for FF Beta (8). I will try to run the functional testrun 100 times to see if anything shows up.
I was able to reproduce this by running the testSearch folder on qa-set in the Win2k VM. Running the test alone does not reproduce the failure. The minimized failure case is an interaction between testGetMoreSearchEngines.js and the hand-off to testOpenSearchAutoDiscovery.js. Maybe a garbage collector issue. Remus, can you provide a patch which refactors testGetMoreSearchEngines.js to bring it up to our standards for new tests? Attach it to this bug and I will apply it locally to the Win2K VM on qa-set. Thanks
In the meantime, I'm going to set this test as skipped so the failures clear up.
Attachment #563402 - Flags: review?(alex.lakatos) → review+
Attachment #563402 - Attachment description: skip test v2 → skip test v2 [checked-in]
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][mozmill-test-skipped]
Would be good to know if Remus can reproduce it in the exact same situation on his VM. If that's the case it would make it much easier to fix. Thanks Anthony, that was kinda helpful!
Status: REOPENED → ASSIGNED
I ran the tests on a real win2k machine. What I've got so far is visible on brasstacks for crowd. Just look after Build ID: 20110928060149. I ran the functional test_run 200 times. Here is a summary of what I observed: testOpenSearchAutodiscovery.js failed 41 times almost one after another, which is approximately the first 41 test runs. After that it wouldn't fail any more. What I want to do next, given Anthony's comment: find a way to always reproduce this issue in order to fix it, meaning I will run only with 2 files in the testSearch folder. Anthony, I will make a patch if this always reproduces for you.
Remus, even if the failure is only happening occasionally, you should put more debug information into the test. Add sleep calls to slow down the test for visibility checks or use dump statements to log values directly to the console. In any case a reproducible failure would be better at all. Thanks for the initially investigation.
Attached image screenshot of fail
I found the problem but I need some help with what will be the following steps in investigating the root cause. So as you can see the page that gives us a search engine cannot be displayed. I ran the testSearch folder with only 2 tests inside: testGetMoreSearchEngines and testOpenSearchAutodiscovery. It does not fail all the time. Notice: I could not use dump() to output on the console.
That's interesting and reminds me on bug 672884. Do we close any tab before we open this page, e.g. closeAllTabs()? That could be the reason here. It would be great if you could combine those two test files into a single test, which would make the investigation and a possible fix easier.
AFAIK we will drop support for Win 2K. So I've unassigned myself until new resolution.
Assignee: remus.pop → nobody
Status: ASSIGNED → NEW
Yes, Firefox 12 is the last release Windows 2000 will be supported. Considering that this only happens on Windows 2000, I think we should try re-enabling this test on default and aurora.and then let it ride the train. Remus, can you take care of this?
Enables the test.
Assignee: nobody → remus.pop
Status: NEW → ASSIGNED
Attachment #616964 - Flags: review?(anthony.s.hughes)
Comment on attachment 616964 [details] [diff] [review] enable v1 (default,aurora) [checked-in] Looks good to me. I'll land this now. NOTE: I still expect to see failures until bug 747375 is resolved.
Attachment #616964 - Flags: review?(anthony.s.hughes) → review+
Comment on attachment 616964 [details] [diff] [review] enable v1 (default,aurora) [checked-in] Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/d1e201339653 (default) Patch fails to apply cleanly to mozilla-aurora, please update.
Attachment #616964 - Attachment description: enable test v1 (default, aurora) → enable v1 (default) [checked-in]
Very strange. The patch was last refreshed in mozilla-aurora branch. It applies cleanly on a new repo on my side.
Comment on attachment 616964 [details] [diff] [review] enable v1 (default,aurora) [checked-in] Yeah, that was strange. It applied cleanly via hg-transplant. Landed: http://hg.mozilla.org/qa/mozmill-tests/rev/bfe7df26371b (mozilla-aurora)
Attachment #616964 - Attachment description: enable v1 (default) [checked-in] → enable v1 (default,aurora) [checked-in]
Resolving WONTFIX given that we won't fix the failure (due to Win2k de-support) and the test has been enabled only for branches where Firefox has Win2k de-support.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago13 years ago
Resolution: --- → WONTFIX
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: