Closed Bug 1088551 Opened 10 years ago Closed 9 years ago

Test failure 'Panel is in the correct state - 'closed' should equal 'open'' in testSecurity/testSSLStatusAfterRestart.js

Categories

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

All
Linux
defect

Tracking

(firefox35 fixed, firefox36 fixed, firefox37 fixed, firefox38 fixed)

RESOLVED FIXED
Tracking Status
firefox35 --- fixed
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: cosmin-malutan, Assigned: cosmin-malutan)

References

()

Details

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

Attachments

(1 file, 11 obsolete files)

Module:    firefox/lib/toolbars.js
Test:      testDisplayCertificateStatusAfterRestart    
Failure:   Panel is in the correct state - 'closed' should equal 'open
Branches:  Beta
Platforms: Ubuntu

This fails only on Beta / Ubuntu 
I couldn't reproduce it locally without interfering with the run, but it failed quite a lot in beta runs.
What happens here is that somehow after the notification is opend it get's closed before we can take any action on it.
http://hg.mozilla.org/qa/mozmill-tests/file/cf96c843574c458bfb45f895e50fc4decb9b626e/firefox/tests/remote/testSecurity/testSSLStatusAfterRestart.js#l117


http://mozmill-release.blargon7.com/#/remote/failure?app=Firefox&branch=All&platform=All&from=2014-10-23&to=&test=%2FtestSecurity%2FtestSSLStatusAfterRestart.js&func=testDisplayCertificateStatusAfterRestart

This would need a skip patch for Beta.
Are all Ubuntu machines affected?
Priority: -- → P1
Both 35 and 36 are affected: http://mozmill-daily.blargon7.com/#/remote/failure?app=Firefox&branch=All&platform=All&from=2014-10-23&to=&test=%2FtestSecurity%2FtestSSLStatusAfterRestart.js&func=testDisplayCertificateStatusAfterRestart

Cosmin, please prepare a skip patch.

We blamed a similar failure on the e10s intro window (need to find the bug). But this notification does not exist on Beta.
Flags: needinfo?(cosmin.malutan)
Attached image quick_tour_notification.jpg (obsolete) —
On OSX, Firefox 34 with mozmill 2.0.8.1 does still has the "Quick Tour" notification. As per my previous comment it's possible this is the cause, and will be fixed with mozmill 2.9
See bug 1082590.

The cause would be that the action to close the panel ("ESC") closes the Quick Tour panel instead of the one we wait for to close.
Depends on: 1082077
Attached patch skip patch (obsolete) — Splinter Review
Here is the skip patch
Flags: needinfo?(cosmin.malutan)
Attachment #8510983 - Flags: review?(andrei.eftimie)
Comment on attachment 8510983 [details] [diff] [review]
skip patch

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

Disabled:
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/18333b956bc3 (default)
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/3a5440dc4bdb (mozilla-aurora)
remote:   https://hg.mozilla.org/qa/mozmill-tests/rev/932474404191 (mozilla-beta)
Attachment #8510983 - Flags: review?(andrei.eftimie)
Attachment #8510983 - Flags: review+
Attachment #8510983 - Flags: checkin+
Just a note that we haven't confirmed this to be fixed by mozmill 2.0.9 with bug 1082077
At this stage it's just as likely to be something else.
Assignee: nobody → teodor.druta
Status: NEW → ASSIGNED
Whiteboard: [mozmill-test-failure] → [mozmill-test-failure][sprint]
I tried to reproduce this bug locally with both mozmill 2.0.8.1 and 2.0.9 using an Ubuntu 13.10 machine and locale builds from the reports, it didn't failed at all.
(In reply to Teodor Druta from comment #9)
> There are no more failures since mozmill 2.0.9 landed (24-10-2014) for both
> release and nightly.
> I think this is fixed now.
> 
> http://mozmill-release.blargon7.com/#/remote/
> failure?app=Firefox&branch=All&platform=All&from=2014-10-
> 25&to=&test=%2FtestSecurity%2FtestSSLStatusAfterRestart.
> js&func=testDisplayCertificateStatusAfterRestart
> 
> http://mozmill-daily.blargon7.com/#/remote/
> failure?app=Firefox&branch=All&platform=All&from=2014-10-
> 25&to=&test=%2FtestSecurity%2FtestSSLStatusAfterRestart.
> js&func=testDisplayCertificateStatusAfterRestart

Please disregard this comment, Mozmill 2.0.9 isn't in production yet and also this test is skipped

Will continue investigating this bug locally.
 I tried to reproduce it locally with mozmill 2.0.9 using an Ubuntu 13.10 machine, it didn't fail at all.Here are the results:
http://mozmill-crowd.blargon7.com/#/remote/report/6ceccc4004d363e02f4bec5e0e5ea5b9 .
Before enabling this again, I'd like it checked on an Ubuntu machine from staging, with latest beta.
Assignee: teodor.druta → daniela.domnici
I tried to reproduce it using Ubuntu 13.10 production machine. It didn`t fail at all. Here are the results: http://mozmill-crowd.blargon7.com/#/remote/report/8469cd03fbfbd17b47a7e8cdb312b46f
Ok, let's enable this and see how it behaves.
http://hg.mozilla.org/qa/mozmill-tests/rev/b897645d673e (default)
Backed out:
http://hg.mozilla.org/qa/mozmill-tests/rev/77972bff784c (aurora)
http://hg.mozilla.org/qa/mozmill-tests/rev/38c1b700b1a1 (beta)
http://hg.mozilla.org/qa/mozmill-tests/rev/18f0bfedeb9a (release)

Thanks for checking this Daniela. Marking as fixed by Mozmill 2.0.9 release.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This fails again on 35.0beta/Ubuntu .
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Skip patch does not apply anymore. It's strange it reproduced again, Daniela did a testrun on a production machine for beta with ko locale. Must be intermittent. Lets update the skip patch.
Attached patch skipSSL.patch (obsolete) — Splinter Review
Updated skip patch for beta branch.
Attachment #8537723 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537723 - Flags: review?(andreea.matei)
Comment on attachment 8537723 [details] [diff] [review]
skipSSL.patch

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

Disabled: 
http://hg.mozilla.org/qa/mozmill-tests/rev/7a4d80a2418c (beta)
Attachment #8537723 - Flags: review?(mihaela.velimiroviciu)
Attachment #8537723 - Flags: review?(andreea.matei)
Attachment #8537723 - Flags: review+
Status: REOPENED → ASSIGNED
Mihaela, I just checked the reports, what failed with latest beta was another failure with waitForPageLoad not the one in the summary:
http://mozmill-release.blargon7.com/#/remote/failure?app=Firefox&branch=35&platform=All&from=2014-12-15&to=&test=%2FtestSecurity%2FtestSSLStatusAfterRestart.js&func=testDisplayCertificateStatusAfterRestart
It should have been a separate bug, the remote page might have been down.
Today is not reproducing anymore, Daniela tested on staging. I'll backout the skip patch:
http://hg.mozilla.org/qa/mozmill-tests/rev/fa6edeb06f56 (beta)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Disabled on beta:
http://hg.mozilla.org/qa/mozmill-tests/rev/7f7bade7f0b1 (beta)

It appears only on production we can reproduce after all. Daniela is investigating after todays runs.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: [mozmill-test-failure][sprint] → [mozmill-test-failure][mozmill-test-skipped][sprint]
Attached patch fix_patch (obsolete) — Splinter Review
Bug fix:'Panel is in the correct state - 'closed' should equal 'open' in toolbars.js for testSSLStatusAfterRestart.js.

Here are the results(multiple testruns):
Nightly : http://mozmill-crowd.blargon7.com/#/remote/reports?app=All&branch=37&platform=All&from=2014-12-23&to=2014-12-23 ;
Attachment #8540671 - Flags: review?(mihaela.velimiroviciu)
Attachment #8540671 - Flags: review?(andreea.matei)
Comment on attachment 8540671 [details] [diff] [review]
fix_patch

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

::: firefox/lib/toolbars.js
@@ +1429,5 @@
>  
>    var eventType = "popupshown";
>    if (open) {
>      if (spec.panel.getNode()) {
> +      assert.waitFor(() => (spec.panel.getNode().state == "closed"),

Lets use triple =.

@@ +1437,5 @@
>        spec.parent = spec.parent || spec.panel._defaultView;
>      }
>    }
>    else {
> +    assert.waitFor(() => (spec.panel.getNode().state == "open"),

Same here.
Attachment #8540671 - Flags: review?(mihaela.velimiroviciu)
Attachment #8540671 - Flags: review?(andreea.matei)
Attachment #8540671 - Flags: review-
Attached patch fix_patch_V1 (obsolete) — Splinter Review
Changes requested were added.
Full testrun results:
Nightly: http://mozmill-crowd.blargon7.com/#/remote/report/f4189e259b668417231c4d9ed0a8bab3
Attachment #8540671 - Attachment is obsolete: true
Attachment #8540686 - Flags: review?(andreea.matei)
Comment on attachment 8540686 [details] [diff] [review]
fix_patch_V1

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

Just to mention, Daniela tested this fix with nightly, aurora and beta, on a affected production machine where she could reproduce before. Did about 40 testruns for each branch.
Attachment #8540686 - Flags: review?(hskupin)
Attachment #8540686 - Flags: review?(andreea.matei)
Attachment #8540686 - Flags: review+
Comment on attachment 8540686 [details] [diff] [review]
fix_patch_V1

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

r=me with the nits fixed. Thanks for analyzing and testing the fix Daniela!

::: firefox/lib/toolbars.js
@@ +1430,5 @@
>    var eventType = "popupshown";
>    if (open) {
>      if (spec.panel.getNode()) {
> +      assert.waitFor(() => (spec.panel.getNode().state === "closed"),
> +                     "Panel is in the correct state");

I think we should really say "Panel is in closed state".

@@ +1438,5 @@
>      }
>    }
>    else {
> +    assert.waitFor(() => (spec.panel.getNode().state === "open"),
> +                   "Panel is in the correct state");

Same here for open.
Attachment #8540686 - Flags: review?(hskupin) → review+
Attached patch fix_patch_V2 (obsolete) — Splinter Review
Changes requested were added.
Attachment #8540686 - Attachment is obsolete: true
Attachment #8542139 - Flags: review?(andreea.matei)
Comment on attachment 8542139 [details] [diff] [review]
fix_patch_V2

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

Great, lets see how it works.
Attachment #8542139 - Flags: review?(andreea.matei) → review+
Seems I forgot to add the link here:
http://hg.mozilla.org/qa/mozmill-tests/rev/ab3e7cf39ec3 (default)
I'll watch todays runs and if all is fine we can backport.
This should be skipped on Beta as we got a lot of failures again.
Attached patch skip SSl on beta (obsolete) — Splinter Review
Created a new skip patch for beta branch.
Attachment #8549482 - Flags: review?(mihaela.velimiroviciu)
Attachment #8549482 - Flags: review?(andreea.matei)
Comment on attachment 8549482 [details] [diff] [review]
skip SSl on beta

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

This fails only on linux, lets update the manifest for that.
Attachment #8549482 - Flags: review?(mihaela.velimiroviciu)
Attachment #8549482 - Flags: review?(andreea.matei)
Attachment #8549482 - Flags: review-
Attached patch skip SSL for linux machine (obsolete) — Splinter Review
Created a new skip pach for linux machine.
Attachment #8549482 - Attachment is obsolete: true
Comment on attachment 8549496 [details] [diff] [review]
skip SSL for linux machine

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

http://hg.mozilla.org/qa/mozmill-tests/rev/f74f426c606d (beta)
Attachment #8549496 - Flags: review+
Status: REOPENED → ASSIGNED
I could reproduce this about once in 10 tries, but I would't skip it on default and aurora.
This test has an fallout failure after the restart:
> controller.waitForPageLoad(URI=https://ssl-ev.mozqa.com/, readyState=complete)
We don't have to worry about that once we fix the notification failure. 

We open the notification by clicking on the identity box, this should have the security state of the page opened in the respective tab. But if the page in cause has no valid proxystate, the handler will return early:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js?rev=63680efe6d55#7287
Assignee: daniela.domnici → cosmin.malutan
Attached patch patch v3.0 (obsolete) — Splinter Review
As I said in the comment above, in order to be able to open the notification, the proxy state of the page has to be valid(loaded), here is the fix-patch. 

Report:
http://mozmill-crowd.blargon7.com/#/remote/report/dd0cbbf05a3aab4a7676502a86479a54
Attachment #8551665 - Flags: review?(mihaela.velimiroviciu)
Attachment #8551665 - Flags: review?(andreea.matei)
Comment on attachment 8551665 [details] [diff] [review]
patch v3.0

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

Looks good, but I have one suggestion.

::: firefox/lib/toolbars.js
@@ +1007,5 @@
>      waitForNotificationPanel(aCallback, {open: spec.open, panel: panel});
> +  },
> +
> +  /**
> +   * Waits for the proxy state of the current page

Nit: "Wait for the proxy state of the current page to be valid" or "Wait for a certain proxy state of the current page" (depending on what you do for the next proposal)

@@ +1009,5 @@
> +
> +  /**
> +   * Waits for the proxy state of the current page
> +   */
> +  waitForProxyState : function locationBar_waitForProxyState() {

To be clearer for what state we are waiting for, I suggest to either rename the function to waitForProxyStateValid() or to add an argument to the function that holds the state value we are waiting for (the second option will allow us to wait for other states as well if we need to)
Attachment #8551665 - Flags: review?(mihaela.velimiroviciu)
Attachment #8551665 - Flags: review?(andreea.matei)
Attachment #8551665 - Flags: review-
Attached patch patch v4.0 (obsolete) — Splinter Review
Done, thanks.
Attachment #8510964 - Attachment is obsolete: true
Attachment #8510983 - Attachment is obsolete: true
Attachment #8537723 - Attachment is obsolete: true
Attachment #8542139 - Attachment is obsolete: true
Attachment #8549496 - Attachment is obsolete: true
Attachment #8551665 - Attachment is obsolete: true
Attachment #8551771 - Flags: review?(mihaela.velimiroviciu)
Attachment #8551771 - Flags: review?(mihaela.velimiroviciu) → review+
Comment on attachment 8551771 [details] [diff] [review]
patch v4.0

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

One of you should add me so we can move further with the fix :) Looks good to me.
Attachment #8551771 - Flags: review?(hskupin)
Comment on attachment 8551771 [details] [diff] [review]
patch v4.0

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

Some nits, but with those fixed r=me.

::: firefox/lib/toolbars.js
@@ +1007,5 @@
>      waitForNotificationPanel(aCallback, {open: spec.open, panel: panel});
> +  },
> +
> +  /**
> +   * Wait for a certain proxy state of the current page

Please add a bit more what the proxy state actually is. This might be very confusing for users of this method.

@@ +1016,5 @@
> +  waitForProxyState : function locationBar_waitForProxyState(aState="valid") {
> +    var urlbar = this.getElement({type: "urlbar"});
> +
> +    assert.waitFor(() => urlbar.getNode().getAttribute("pageproxystate") === aState,
> +                   "Current page is in the expected proxy state!");

So far as I got it is about the URL and not the page. So "Current URL has the proxy state: aState" would be better, which also includes the expected value.

::: firefox/tests/remote/testSecurity/testSSLStatusAfterRestart.js
@@ +78,2 @@
>  
>      cert = security.getCertificate(tabBrowser.securityUI);

I would put the blank line before the call to waitForProxyState() given that it is closer related to the verify function as for loading the page.

@@ +93,2 @@
>  
>      cert = security.getCertificate(tabBrowser.securityUI);

Same here.
Attachment #8551771 - Flags: review?(hskupin) → review+
Attached patch patch v4.1 (obsolete) — Splinter Review
I ran the test alone for checking.
If we don't wan't to skip the test on aurora until tomorrow we should backport it straight to aurora.
Attachment #8551771 - Attachment is obsolete: true
Attachment #8552428 - Flags: review?(andreea.matei)
Comment on attachment 8552428 [details] [diff] [review]
patch v4.1

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

We're ready to land with this.

::: firefox/lib/toolbars.js
@@ +1007,5 @@
>      waitForNotificationPanel(aCallback, {open: spec.open, panel: panel});
> +  },
> +
> +  /**
> +   * Wait current URL to have the expected pageproxystate state

Wait for the ..
Attachment #8552428 - Flags: review?(andreea.matei) → review+
Attached patch patch v4.2Splinter Review
Done
Attachment #8552428 - Attachment is obsolete: true
Attachment #8552436 - Flags: review?(andreea.matei)
Attachment #8552436 - Flags: review?(andreea.matei) → review+
Andreea, could you backport this to beta and close the bug please? 
http://mozmill-crowd.blargon7.com/#/remote/report/7485d49d3e5bf7c4685a1f78860457c1
Flags: needinfo?(andreea.matei)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → FIXED
Whiteboard: [mozmill-test-failure][mozmill-test-skipped][sprint] → [mozmill-test-failure][sprint]
Failed again with the latest beta (36.0b5).

Reports: http://mozmill-release.blargon7.com/#/remote/report/7485d49d3e5bf7c4685a1f78866d164b
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This failed because the initial fix didn't get back-ported to beta and release:
http://hg.mozilla.org/qa/mozmill-tests/rev/ab3e7cf39ec3
https://hg.mozilla.org/qa/mozmill-tests/rev/7a59961dfd27 (beta)
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Andreea, could you backport this patch to release, we need it to re-enable  tests like the one in bug 1096178.
Flags: needinfo?(andreea.matei)
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: