Bug 1574097 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

A correction to what I said earlier:

It looks like WPT uses the same port randomisation technique as
Selenium for other test types, by setting leaving the `port` kwarg
as `None`, which will call `get_free_port()`:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/wptrunner/wptrunner/webdriver_server.py#109

So the easiest fix for bug 1571426 is to ensure `defaults.DRIVER_PORT`
is set to `None`, though this comes at the slight risk of a race
condition.
It looks like WPT uses the same port randomisation technique as
Selenium for other test types by setting leaving the `port` kwarg
as `None`, which will call `get_free_port()`:
https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/wptrunner/wptrunner/webdriver_server.py#109

With wdspec this gets set to `defaults.DRIVER_PORT`, so likely the
easiest fix for bug 1571426 is to ensure that is set to `None`.
This comes at the slight risk of a race condition, in that the port
is bound by `get_free_port()` and subsequently released. This is
not atomic, and another process could potentially bind to the port
before geckodriver has time to.

Back to Bug 1574097 Comment 3