Bug 1399592 - Increase Marionette startup timeout for mochitest/reftest. r=gbrown

Currently the mochitest and reftest runners are forcing a timeout of 60s
(or 900s for valgrind or debug builds) when calling `start_session` of
Marionette. While this method still offers a timeout parameter, the
timeout should be set via the `startup_timeout` argument for Marionette.

Reason is that Marionette doesn't control the browser instance and
is getting called right after the application gets launched. As such
slow running builds can cause timeouts once it takes longer than 60s
for the Marionette server to get started.

By using `startup_timeout` the timeout will even be configurable via
the command line and mozharness config files.

MozReview-Commit-ID: EV7GklBcJjU

--HG--
extra : rebase_source : 9d3c623c49deb92d68c40ba4410c812c864e06bd
This commit is contained in:
Henrik Skupin 2017-09-14 16:18:58 +02:00
parent d361d3aadb
commit 03d4b0f51c
4 changed files with 4 additions and 15 deletions

View File

@ -136,10 +136,6 @@ class ReftestArgumentsParser(argparse.ArgumentParser):
default=None,
help="host:port to use when connecting to Marionette")
self.add_argument("--marionette-port-timeout",
default=None,
help=argparse.SUPPRESS)
self.add_argument("--marionette-socket-timeout",
default=None,
help=argparse.SUPPRESS)
@ -373,7 +369,7 @@ class DesktopArgumentsParser(ReftestArgumentsParser):
if options.debugger:
# valgrind and some debuggers may cause Gecko to start slowly. Make sure
# marionette waits long enough to connect.
options.marionette_port_timeout = 900
options.marionette_startup_timeout = 900
options.marionette_socket_timeout = 540
if not options.tests:

View File

@ -699,7 +699,7 @@ class RefTest(object):
marionette_args['port'] = int(port)
marionette = Marionette(**marionette_args)
marionette.start_session(timeout=options.marionette_port_timeout)
marionette.start_session()
addons = Addons(marionette)
if options.specialPowersExtensionPath:

View File

@ -552,11 +552,6 @@ class MochitestArguments(ArgumentContainer):
{"default": None,
"help": "host:port to use when connecting to Marionette",
}],
[["--marionette-port-timeout"],
{"default": None,
"help": "Timeout while waiting for the marionette port to open.",
"suppress": True,
}],
[["--marionette-socket-timeout"],
{"default": None,
"help": "Timeout while waiting to receive a message from the marionette server.",
@ -747,7 +742,7 @@ class MochitestArguments(ArgumentContainer):
if options.valgrind or options.debugger:
# valgrind and some debuggers may cause Gecko to start slowly. Make sure
# marionette waits long enough to connect.
options.marionette_port_timeout = 900
options.marionette_startup_timeout = 900
options.marionette_socket_timeout = 540
if options.store_chrome_manifest:

View File

@ -2152,9 +2152,8 @@ toolbar#nav-bar {
# start marionette and kick off the tests
marionette_args = marionette_args or {}
port_timeout = marionette_args.pop('port_timeout', 60)
self.marionette = Marionette(**marionette_args)
self.marionette.start_session(timeout=port_timeout)
self.marionette.start_session()
# install specialpowers and mochikit addons
addons = Addons(self.marionette)
@ -2586,7 +2585,6 @@ toolbar#nav-bar {
marionette_args = {
'symbols_path': options.symbolsPath,
'socket_timeout': options.marionette_socket_timeout,
'port_timeout': options.marionette_port_timeout,
'startup_timeout': options.marionette_startup_timeout,
}