Closed Bug 1662066 Opened 4 years ago Closed 4 years ago

Use a single `waitFor` test helper and make it highlight which precise assertion failed.

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

First, there is probably three distinct implementation, all being the same:
https://searchfox.org/mozilla-central/search?q=function+waitFor%28&path=devtools&case=false&regexp=false

They probably conflict with:
https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/test/head.js#747
which should be removed in favor of using EventEmitter.once directly. This old helper was useful back in the days, when we weren't having such once method...

And the worse is that these waitFor method do not give any context about what failed.
No stack, no particular context message is required to be passed.
We typically only get:

0:13.24 FAIL Uncaught exception - waitFor - timed out after 500 tries.
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81e54ebee65d
Remove netmonitor waitFor test helper. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/53fd170899a1
Use a single waitFor test helper implementation. r=nchevobbe
https://hg.mozilla.org/integration/autoland/rev/2ab790a92a79
Print more information when waitFor() test helper fails. r=nchevobbe
Blocks: 1662503
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: