author | Sebastian Hengst <archaeopteryx@coole-files.de> |
Fri, 08 Sep 2017 09:30:48 +0200 | |
changeset 379676 | 95430ac5c638f16cb20bca4abcffd02f9092b81c |
parent 379675 | c54babd134d3400891d83920bc71eb45243a1566 |
child 379677 | 23a9ea8f5b16a2abe56fbf7639905c9018358544 |
push id | 32461 |
push user | kwierso@gmail.com |
push date | Fri, 08 Sep 2017 20:15:32 +0000 |
treeherder | mozilla-central@dd3736e98e4e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | backout |
bugs | 1397734 |
milestone | 57.0a1 |
backs out | bc05e6c94a1725d5561810e7a8d78b6f2484e60c |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/testing/marionette/client/marionette_driver/marionette.py +++ b/testing/marionette/client/marionette_driver/marionette.py @@ -558,17 +558,17 @@ class Marionette(object): # Bug 1336953 - Until we can remove the socket timeout parameter it has to be # set a default value which is larger than the longest timeout as defined by the # WebDriver spec. In that case its 300s for page load. Also add another minute # so that slow builds have enough time to send the timeout error to the client. DEFAULT_SOCKET_TIMEOUT = 360 def __init__(self, host="localhost", port=2828, app=None, bin=None, - baseurl=None, socket_timeout=None, + baseurl=None, socket_timeout=DEFAULT_SOCKET_TIMEOUT, startup_timeout=None, **instance_args): """Construct a holder for the Marionette connection. Remember to call ``start_session`` in order to initiate the connection and start a Marionette session. :param host: Host where the Marionette server listens. Defaults to localhost. @@ -595,25 +595,20 @@ class Marionette(object): self.session = None self.session_id = None self.process_id = None self.profile = None self.window = None self.chrome_window = None self.baseurl = baseurl self._test_name = None + self.socket_timeout = socket_timeout self.crashed = 0 - self.socket_timeout = socket_timeout - self.startup_timeout = startup_timeout - if self.socket_timeout is None: - self.socket_timeout = self.DEFAULT_SOCKET_TIMEOUT - if self.startup_timeout is None: - self.startup_timeout = self.DEFAULT_STARTUP_TIMEOUT - + self.startup_timeout = int(startup_timeout or self.DEFAULT_STARTUP_TIMEOUT) if self.bin: if not Marionette.is_port_available(self.port, host=self.host): ex_msg = "{0}:{1} is unavailable.".format(self.host, self.port) raise errors.MarionetteException(message=ex_msg) self.instance = GeckoInstance.create( app, host=self.host, port=self.port, bin=self.bin, **instance_args) self.instance.start()
--- a/testing/marionette/harness/marionette_harness/runner/base.py +++ b/testing/marionette/harness/marionette_harness/runner/base.py @@ -234,16 +234,21 @@ class MarionetteTextTestRunner(Structure def run(self, test): result = super(MarionetteTextTestRunner, self).run(test) result.printLogs(test) return result class BaseMarionetteArguments(ArgumentParser): + # Bug 1336953 - Until we can remove the socket timeout parameter it has to be + # set a default value which is larger than the longest timeout as defined by the + # WebDriver spec. In that case its 300s for page load. Also add another minute + # so that slow builds have enough time to send the timeout error to the client. + socket_timeout_default = 360.0 def __init__(self, **kwargs): ArgumentParser.__init__(self, **kwargs) def dir_path(path): path = os.path.abspath(os.path.expanduser(path)) if not os.access(path, os.F_OK): os.makedirs(path) @@ -302,26 +307,21 @@ class BaseMarionetteArguments(ArgumentPa "Default cap is 30 runs, which can be overwritten " "with the --repeat parameter.") self.add_argument('--testvars', action='append', help='path to a json file with any test data required') self.add_argument('--symbols-path', help='absolute path to directory containing breakpad symbols, or the ' 'url of a zip file containing symbols') - self.add_argument('--socket-timeout', - type=float, - default=Marionette.DEFAULT_SOCKET_TIMEOUT, - help='Set the global timeout for marionette socket operations.' - ' Default: %(default)ss.') self.add_argument('--startup-timeout', type=int, - default=Marionette.DEFAULT_STARTUP_TIMEOUT, + default=60, help='the max number of seconds to wait for a Marionette connection ' - 'after launching a binary. Default: %(default)ss.') + 'after launching a binary') self.add_argument('--shuffle', action='store_true', default=False, help='run tests in a random order') self.add_argument('--shuffle-seed', type=int, default=random.randint(0, sys.maxint), help='Use given seed to shuffle tests') @@ -346,16 +346,21 @@ class BaseMarionetteArguments(ArgumentPa help='Define the name to associate with the logger used') self.add_argument('--jsdebugger', action='store_true', default=False, help='Enable the jsdebugger for marionette javascript.') self.add_argument('--pydebugger', help='Enable python post-mortem debugger when a test fails.' ' Pass in the debugger you want to use, eg pdb or ipdb.') + self.add_argument('--socket-timeout', + type=float, + default=self.socket_timeout_default, + help='Set the global timeout for marionette socket operations.' + ' Default: %(default)ss.') self.add_argument('--disable-e10s', action='store_false', dest='e10s', default=True, help='Disable e10s when running marionette tests.') self.add_argument("--headless", action="store_true", dest="headless", @@ -507,19 +512,18 @@ class BaseMarionetteTestRunner(object): repeat=None, run_until_failure=None, testvars=None, symbols_path=None, shuffle=False, shuffle_seed=random.randint(0, sys.maxint), this_chunk=1, total_chunks=1, server_root=None, gecko_log=None, result_callbacks=None, prefs=None, test_tags=None, - socket_timeout=None, - startup_timeout=None, - addons=None, workspace=None, + socket_timeout=BaseMarionetteArguments.socket_timeout_default, + startup_timeout=None, addons=None, workspace=None, verbose=0, e10s=True, emulator=False, headless=False, **kwargs): self._appName = None self._capabilities = None self._filename_pattern = None self._version_info = {} self.fixture_servers = {} self.fixtures = Fixtures() @@ -534,28 +538,28 @@ class BaseMarionetteTestRunner(object): self.addons = addons self.logger = logger self.marionette = None self.logdir = logdir self.repeat = repeat or 0 self.run_until_failure = run_until_failure or False self.symbols_path = symbols_path self.socket_timeout = socket_timeout - self.startup_timeout = startup_timeout self.shuffle = shuffle self.shuffle_seed = shuffle_seed self.server_root = server_root self.this_chunk = this_chunk self.total_chunks = total_chunks self.mixin_run_tests = [] self.manifest_skipped_tests = [] self.tests = [] self.result_callbacks = result_callbacks or [] self.prefs = prefs or {} self.test_tags = test_tags + self.startup_timeout = startup_timeout self.workspace = workspace # If no workspace is set, default location for gecko.log is . # and default location for profile is TMP self.workspace_path = workspace or os.getcwd() self.verbose = verbose self.headless = headless # self.e10s stores the desired configuration, whereas