Closed Bug 1449862 Opened 6 years ago Closed 6 years ago

Check for available port each time before starting binary

Categories

(Remote Protocol :: Marionette, enhancement, P1)

enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Currently we only check if port 2828 is available when initializing Marionette:

https://dxr.mozilla.org/mozilla-central/rev/a456475502b80a1264642d9eaee9394a8fad8315/testing/marionette/client/marionette_driver/marionette.py#618-620

This is racy and can lead to side-effects like I have seen on bug 1400819 when using non in_app `restart()` and `quit()` calls, because for the next session this check is no longer performed and accidentally left-over instances of Firefox would still claim that port.

Result is that we would continue to run our tests in the other process but not the currently started one.

To prevent things like that we should really do this check each time the process gets started via `start_binary()`.
Comment on attachment 8963500 [details]
Bug 1449862 - [marionette] Check for available port each time before starting binary.

https://reviewboard.mozilla.org/r/232442/#review237854

It’s terrible we are still stuck with this type of port allocation
polling.
Attachment #8963500 - Flags: review?(ato) → review+
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d99bcacaf32
[marionette] Check for available port each time before starting binary. r=ato
https://hg.mozilla.org/mozilla-central/rev/0d99bcacaf32
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: