Closed Bug 1377401 Opened 7 years ago Closed 7 years ago

Intermittent browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow.js | Test timed out -

Categories

(WebExtensions :: Untriaged, defect, P1)

defect

Tracking

(firefox57 fixed)

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: rpl)

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed:other])

Attachments

(1 file)

This intermittent has ramped up after Bug 1392531 has been landed yesterday.

By looking at the failure logs it seems that the test timeouts, but once the test is exiting, it also fails because in the "browser.test" messages collected there is the message that the test was waiting when the test timeouts (also this test test seems to timeout only in non e10s mode on windows 7 in debug mode).

The issue seems to be a race in the new test case itself, and the attached patch applies a small change to the test to avoid the race (using promise.all instead of awaiting the two messages in sequence), I pushed it to try (where I'm able to reproduce the failure easily using "./mach try ... --rebuild 3") and this change seems to be able to stop it from failing intermittently.
Attachment #8900509 - Flags: review?(aswan)
Whiteboard: [stockwell needswork]
Comment on attachment 8900509 [details]
Bug 1377401 - Fix devtools.inspectedWindow test intermittent.

https://reviewboard.mozilla.org/r/171898/#review177774

::: browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow.js:267
(Diff revision 2)
> -      if (msg !== "inspectedWindow-eval-request") {
> +      if (msg === "inspectedWindow-panel-eval-request") {
> +        return;
> +      }
> +
> +      if (msg !== "inspectedWindow-page-eval-request") {
>          browser.test.fail(`Unexpected test message received: ${msg}`);
>          return;
>        }
>  
>        const [evalResult, errorResult] = await browser.devtools.inspectedWindow.eval(...args);
>        browser.test.sendMessage("inspectedWindow-page-eval-result", {
>          evalResult,
>          errorResult,
>        });
>      });

nit: this would be more logical if it was either `if (msg == ...) {} else if (msg == ...) {} else { fail(...); }` or a switch statement.
That's a small nit though, feel free to ignore it.
(and same for the panel listener a few lines below here)
Attachment #8900509 - Flags: review?(aswan) → review+
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P1
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/899f6ec3c53e
Fix devtools.inspectedWindow test intermittent. r=aswan
https://hg.mozilla.org/mozilla-central/rev/899f6ec3c53e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Whiteboard: [stockwell needswork] → [stockwell fixed:other]
Flags: qe-verify-
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: