Implement a connect-back mode in Marionette

NEW
Unassigned

Status

defect
P5
normal
5 years ago
6 months ago

People

(Reporter: ted, Unassigned)

Tracking

({pi-marionette-client})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This patch gives the Marionette server a "connect-back" mode, where instead of simply listening for incoming connections it will connect to an existing listen socket as a client and use that as a Marionette session. The advantage of this technique is that it removes the uncertainty involved in having the client poll the server until it's ready. It also removes the need for well-known port numbers, as the client creates the listen socket using any available free port, and communicates that to the Marionette server. This behavior is controlled by three new preferences: marionette.start_as_client and marionette.client.{host,port}.

I implemented this as a proof-of-concept after having the discussion in bug 1025897. Specifically bug 1025897 comment 16. It seems to work fine in my limited testing using desktop Firefox. I didn't plumb it all the way through, specifically I didn't handle the emulator case (although I think I took care to not break the existing code).
This would be particularly useful when multiple instances are being run. This is the case for the AWSY tests where we have 8 instances running simultaneously.
This is now also being discussed in bug 1240830.
Priority: -- → P5
(In reply to Eric Rahm [:erahm] (please no mozreview requests) from comment #2)
> This would be particularly useful when multiple instances are being run.
> This is the case for the AWSY tests where we have 8 instances running
> simultaneously.

FWIW AWSY no longer needs this, it runs in taskcluster now.
Assignee: ted → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.