Bug 1393366 - Increase the marionette connect timeout in wptrunner, r=maja_zf

This switches to using a timeout of 120s * timeout_multplier, which is
twice the current value. The Marionette startup_timout value is
removed because it turns out that's only used when marionette starts
the Firefox instance and therefore is ignored in this case.

MozReview-Commit-ID: 4VA8yB6M1d5

--HG--
extra : rebase_source : ba9d506d4061d49f2a95fbb24e690841fc902c97
This commit is contained in:
James Graham 2017-09-21 17:56:43 +01:00
Родитель cc4705df59
Коммит ad38a14c75
2 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -687,7 +687,8 @@ class Marionette(object):
poll_interval = 0.1
starttime = datetime.datetime.now()
while datetime.datetime.now() - starttime < datetime.timedelta(seconds=timeout):
timeout_time = starttime + datetime.timedelta(seconds=timeout)
while datetime.datetime.now() < timeout_time:
# If the instance we want to connect to is not running return immediately
if runner is not None and not runner.is_running():
return False

Просмотреть файл

@ -62,12 +62,12 @@ class MarionetteProtocol(Protocol):
self.marionette = marionette.Marionette(host='localhost',
port=self.marionette_port,
socket_timeout=None,
startup_timeout=startup_timeout)
startup_timeout=None)
# XXX Move this timeout somewhere
self.logger.debug("Waiting for Marionette connection")
while True:
success = self.marionette.wait_for_port(60 * self.timeout_multiplier)
success = self.marionette.wait_for_port(startup_timeout)
#When running in a debugger wait indefinitely for firefox to start
if success or self.executor.debug_info is None:
break