Closed Bug 1725546 Opened 2 years ago Closed 2 years ago

Fix intermittent inspector tests failures with SSTS enabled

Categories

(DevTools :: Inspector, defect, P5)

defect

Tracking

(Fission Milestone:MVP, firefox93 fixed)

RESOLVED FIXED
93 Branch
Fission Milestone MVP
Tracking Status
firefox93 --- fixed

People

(Reporter: bomsy, Assigned: bomsy)

Details

(Whiteboard: dt-fission-m3-mvp)

Attachments

(1 file)

A couple of inspector tests are failing intermittently due to grid panel updates triggered by reflow updates.

  • browser_rules_grid-highlighter-on-navigate.js
  • browser_rules_media-queries_reload.js

Example failure summary

TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_grid-highlighter-on-navigate.js | A promise chain failed to handle a rejection: Connection closed, pending request to server0.conn19.windowGlobal2147483658/layout32, type getGrids failed

No longer depends on: 1725313

Thanks for the report! Can you please also attach a list of the tests that are failing?

Edit: ah, the first comment was just edited :-)

Flags: needinfo?(hmanilla)
Flags: needinfo?(hmanilla)
Assignee: nobody → hmanilla
Status: NEW → ASSIGNED

Note that we were seeing this kind of failures before server side targets and we already had workaround for them (e.g. https://searchfox.org/mozilla-central/rev/8f08c21f093be1c1c42438697f8bca67af94fc77/devtools/client/inspector/grids/test/browser_grids_grid-outline-highlight-cell.js#31)

This bug should be about having a helper we can call to either:

  • disable grid update on reflows (i.e. what's already existing in our tests, but centralized)
  • Use PromiseTestUtils.allowMatchingRejectionsGlobally to ignore those Promise rejections, something like:
function silenceGetGridsOnReflowPromiseRejection() {
  const { PromiseTestUtils } = ChromeUtils.import(
    "resource://testing-common/PromiseTestUtils.jsm"
  );
  const removeRejectionException = PromiseTestUtils.allowMatchingRejectionsGlobally(
    /Connection closed.*getGrids failed/
  );
  registerCleanupFunction(removeRejectionException);
}

At the moment, any call to PromiseTestUtils.allowMatchingRejectionsGlobally will impact the whole test suite and there's no mechanism to remove an entry from it. We might want to do that as part of Bug 1655422.

Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e4978141f75e
[devtools] Disable grid panel updates triggered by reflow r=nchevobbe

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #3)

This bug should be about having a helper we can call to either:

  • disable grid update on reflows (i.e. what's already existing in our tests, but centralized)
  • Use PromiseTestUtils.allowMatchingRejectionsGlobally to ignore those Promise rejections, something like:

Just to mention, Bug 1725350 was for adding the helper and migrating current tests to using the helper.

At the moment, any call to PromiseTestUtils.allowMatchingRejectionsGlobally will impact the whole test suite and there's no mechanism to remove > an entry from it. We might want to do that as part of Bug 1655422.

Added a bug for it. See Bug 1725565

Thanks

Fission Milestone: --- → MVP
Whiteboard: dt-fission-m3-mvp
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.