Closed Bug 1230151 Opened 9 years ago Closed 8 years ago

Skip out-of-sync messages in Marionette Python client

Categories

(Testing :: Marionette Client and Harness, defect)

defect
Not set
normal

Tracking

(firefox50 fixed, firefox51 fixed)

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- fixed
firefox51 --- fixed

People

(Reporter: ato, Assigned: ato)

References

Details

(Keywords: pi-marionette-client)

Attachments

(2 files)

Following the introduction of message sequencing for Marionette in bug 1211489, we can now switch on skipping out-of-sync messages which will help avoid issues such as bug 1207125.
Blocks: 1207125
Depends on: 1211489
I added tests for this as part of bug 1211503 but apparently the custom skip decorator has a bug and makes the test always pass: https://dxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/tests/unit/test_transport.py?from=test_transport.py#18

The bug is that it returns "self", that is a reference to itself, rather than invoking self.
Assignee: nobody → ato
Status: NEW → ASSIGNED
Summary: Skip out-of-sync messages → Skip out-of-sync messages in Marionette Python client
Bug 1230151: Part 1: Fix skip_unless_protocol ignore decorator

This decorator was previously returning a reference of itself, rather
than executing the test item.  This caused it to always pass.

r=dburns
Bug 1230151: Part 2: Skip out of sync messages in Marionette client

The Marionette remote server sequences messages following bug 1211489.
In the client we can make advantage of this by skipping out-of-sync
messages.

This helps avoid issues such as bug 1207125, where a Python process
interrupt causes the receive() for the current command to be aborted,
and a new command to be issued to retrieve some debug information.
When the new command's receive() is called, it reads the response from
the previous command.

To get around this problem we must read through the data until we reach
the response we are expecting.  Only at that point should we return from
receive() and give the user the expected response.

r=dburns
Attachment #8695841 - Flags: review?(dburns)
Comment on attachment 8695841 [details]
Bug 1230151 - Fix skip_unless_protocol ignore decorator;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27205/diff/1-2/
Comment on attachment 8695842 [details]
Bug 1230151 - Skip out of sync messages in Marionette client;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27207/diff/1-2/
Attachment #8695842 - Flags: review?(dburns)
Comment on attachment 8695841 [details]
Bug 1230151 - Fix skip_unless_protocol ignore decorator;

https://reviewboard.mozilla.org/r/27205/#review24593
Attachment #8695841 - Flags: review?(dburns) → review+
Attachment #8695842 - Flags: review?(dburns) → review+
Comment on attachment 8695841 [details]
Bug 1230151 - Fix skip_unless_protocol ignore decorator;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27205/diff/1-2/
Comment on attachment 8695842 [details]
Bug 1230151 - Skip out of sync messages in Marionette client;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27207/diff/1-2/
Comment on attachment 8695841 [details]
Bug 1230151 - Fix skip_unless_protocol ignore decorator;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27205/diff/2-3/
Attachment #8695841 - Attachment description: MozReview Request: Bug 1230151: Part 1: Fix skip_unless_protocol ignore decorator → MozReview Request: Bug 1230151 - Fix skip_unless_protocol ignore decorator; r?automatedtester
Comment on attachment 8695842 [details]
Bug 1230151 - Skip out of sync messages in Marionette client;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27207/diff/2-3/
Attachment #8695842 - Attachment description: MozReview Request: Bug 1230151: Part 2: Skip out of sync messages in Marionette client → MozReview Request: Bug 1230151 - Skip out of sync messages in Marionette client; r?automatedtester
What is needed for this to land?
Flags: needinfo?(ato)
Test failures that must be investigated.  Not on the top of my list right now, but I will eventually get to this.
Flags: needinfo?(ato)
Comment on attachment 8695841 [details]
Bug 1230151 - Fix skip_unless_protocol ignore decorator;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27205/diff/3-4/
Attachment #8695841 - Attachment description: MozReview Request: Bug 1230151 - Fix skip_unless_protocol ignore decorator; r?automatedtester → Bug 1230151 - Fix skip_unless_protocol ignore decorator;
Attachment #8695842 - Attachment description: MozReview Request: Bug 1230151 - Skip out of sync messages in Marionette client; r?automatedtester → Bug 1230151 - Skip out of sync messages in Marionette client;
Comment on attachment 8695842 [details]
Bug 1230151 - Skip out of sync messages in Marionette client;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27207/diff/3-4/
Comment on attachment 8695842 [details]
Bug 1230151 - Skip out of sync messages in Marionette client;

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/27207/diff/4-5/
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/039f4a14bdfb
Fix skip_unless_protocol ignore decorator; r=automatedtester
https://hg.mozilla.org/integration/autoland/rev/d37f21fd493c
Skip out of sync messages in Marionette client; r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/039f4a14bdfb
https://hg.mozilla.org/mozilla-central/rev/d37f21fd493c
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Product: Testing → Remote Protocol

Moving bugs for Marionette client due to component changes.

Component: Marionette → Marionette Client and Harness
Product: Remote Protocol → Testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: