Closed
Bug 1473614
Opened 6 years ago
Closed 6 years ago
Add debugging shorthand for pausing the thread
Categories
(Remote Protocol :: Marionette, enhancement, P1)
Remote Protocol
Marionette
Tracking
(firefox63 fixed)
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: ato, Assigned: ato)
References
Details
Attachments
(4 files)
6.21 KB,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
3.31 KB,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
981 bytes,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
688 bytes,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
Using TimedPromise it is possible to create a promise that returns given a duration. However, it is a somewhat large amount of boilerplate to do so requiring you to look up the API. Given that WebDriver provides a largely time- and synchronisation-critical protocol it would be useful with a shorthand to pause the thread using async/await for an arbitrary amount of time. This shorthand must—of course—never be used in production.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
This patch introduces stricted type checks for the sync module's PollPromise and TimedPromise. This may seem excessive, but we have had real and severe bugs in this area before.
Attachment #8997459 -
Flags: review?(dburns)
Assignee | ||
Comment 2•6 years ago
|
||
This adds a new public API to the Marionette sync module that can "pause" async functions for an arbitrary amount of hardcoded time. This can be useful for debugging purposes.
Attachment #8997460 -
Flags: review?(dburns)
Assignee | ||
Comment 3•6 years ago
|
||
The "exported" keyword is no longer needed.
Attachment #8997461 -
Flags: review?(dburns)
Assignee | ||
Comment 4•6 years ago
|
||
Attachment #8997462 -
Flags: review?(dburns)
Assignee | ||
Comment 5•6 years ago
|
||
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1f7e2f4ced2c8f5f66a405cee86cea73438c8000
Updated•6 years ago
|
Attachment #8997459 -
Flags: review?(dburns) → review+
Updated•6 years ago
|
Attachment #8997460 -
Flags: review?(dburns) → review+
Updated•6 years ago
|
Attachment #8997461 -
Flags: review?(dburns) → review+
Updated•6 years ago
|
Attachment #8997462 -
Flags: review?(dburns) → review+
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/87a0ebcd004f Add type checks to PollPromise and TimedPromise. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/1ee58097b141 Add sync function Sleep for pausing async functions. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/1d28e128807c Fix exported symbols in sync. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/027922b5ef04 Expose API docs for MessageManagerDestroyedPromise and Sleep. r=automatedtester
Comment 7•6 years ago
|
||
Backed out for xpcshell failures on test_sync.js Backout link: https://hg.mozilla.org/integration/mozilla-inbound/rev/bcd31adc1e7a2bac67c7f9dcce38eb42d1f66c48 Push link: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=027922b5ef0442e4ebb07043d2b57961e6195a78 Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=192136034&repo=mozilla-inbound&lineNumber=1355
Flags: needinfo?(ato)
Assignee | ||
Comment 8•6 years ago
|
||
I believe I have fixed the fallout on slower systems. Doing a try run to confirm: https://treeherder.mozilla.org/#/jobs?repo=try&revision=5cf67fb67e8c960c36a3d8902388069843387098
Flags: needinfo?(ato)
Pushed by atolfsen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/075c87b1393a Add type checks to PollPromise and TimedPromise. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/c76d0cb71ad4 Add sync function Sleep for pausing async functions. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/684c928574c6 Fix exported symbols in sync. r=automatedtester https://hg.mozilla.org/integration/mozilla-inbound/rev/ff6be2623035 Expose API docs for MessageManagerDestroyedPromise and Sleep. r=automatedtester
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/075c87b1393a https://hg.mozilla.org/mozilla-central/rev/c76d0cb71ad4 https://hg.mozilla.org/mozilla-central/rev/684c928574c6 https://hg.mozilla.org/mozilla-central/rev/ff6be2623035
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•