Closed Bug 2090982 Opened 20 days ago Closed 19 days ago

browser_dbg-overrides.js times out when run twice because it leaves its override file in the temp directory

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

When devtools/client/debugger/test/mochitest/browser_dbg-overrides.js runs twice in a row (the mochitest-devtools-chrome-repeat jobs), the second run times out in waitForPaused, and the toolbox it leaves open is then reported as leaked windows and docShells until shutdown.

The first run leaves test.js in PathUtils.tempDir. In the second run, the test's TestUtils.waitForCondition checks (file exists, size > 0) pass immediately. The test then writes the overridden script, and DevToolsUtils.saveAs overwrites it with the original source. The reload never calls foo(), so the debugger never pauses.

Fix: remove the file in a cleanup function, and wait for the SET_NETWORK_OVERRIDE dispatch instead of polling the file.

Test dashboard: https://tests.firefox.dev/test.html?test=devtools/client/debugger/test/mochitest/browser_dbg-overrides.js

The file left in the temp directory by the first run made the existence polling pass before DevToolsUtils.saveAs wrote the original content, which then replaced the test's overridden script, so a repeated run never paused.

Blocks: 2090991
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eecf6fe90329 https://hg.mozilla.org/integration/autoland/rev/3e2363df8fd5 Remove the override file written by browser_dbg-overrides.js and wait for the override to be set, r=devtools-reviewers,nchevobbe.
Regressions: 2091394
Status: ASSIGNED → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
No longer regressions: 2091394
Regressions: 2092096
No longer regressions: 2092096
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: