Open Bug 1750038 Opened 2 years ago Updated 2 years ago

Clear debugger persitant configs at teardown of all devtools tests

Categories

(DevTools :: Debugger, task)

task

Tracking

(Not tracked)

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Debugger settings stored in async-storage like breakpoints are only clear when using these two test helpers:
https://searchfox.org/mozilla-central/rev/435a77f1a1aaf1a78d30a2aaa81c6158a2f83dba/devtools/client/debugger/test/mochitest/helpers.js#523,558

This is a bit brittle as if you are using any other helper to open the debugger, we won't clear the state changed by the tests.
This may introduce conflicts between two tests which could be really hard to debug and figure out.

Ideally, we would always clear the debugger state. And instead of doing that before running a new test, we should rather do that during the teardown of each test.

This ensure that any setting modified during any test will be cleared
between each test.

The downside of this is that it will only clear the settings
at the end of each test instead of the beginning of each task/each call to initDebugger.
So that each task should ensure clearing any state which may interfere
with the subsequent task.

I imagine that some tests may expects tasks to be 100% independent
while some others may write many task sharing the same session...

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:ochameau, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(poirot.alex)
Flags: needinfo?(nchevobbe)

Not sure what's missing. Alex, was there test failures or something that prevented you from landing the patch?

Flags: needinfo?(nchevobbe)

Yes, it triggered some failure. I fixed some but I was mostly buzzy with some other tasks.

Flags: needinfo?(poirot.alex)

I'm getting failures on devtools/client/debugger/test/mochitest/browser_dbg-breakpoints-popup.js even after adding some more tweaks to this test:
https://treeherder.mozilla.org/logviewer?job_id=367274320&repo=try&lineNumber=2936

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: