Bug 1322277 - Default socket timeout has to be larger than the default page load timeout. r=ato, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Tue, 24 Jan 2017 14:17:19 +0100
changeset 375676 e1949e439f0ea0a1edc865e5f595debdcc9d1d94
parent 375675 c39891c2a2f660d154d8218384e0b7f455bcd38b
child 375677 2cc634c870096a8cc5a8f5f57fd96f9b14992e20
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1322277
milestone53.0a2
Bug 1322277 - Default socket timeout has to be larger than the default page load timeout. r=ato, a=test-only To not run into socket failures and forced application shutdown scenarios, the socket timeout should always be larger then the page load timeout. MozReview-Commit-ID: EOBW4mozDT1
testing/marionette/client/marionette_driver/marionette.py
testing/marionette/harness/marionette_harness/runner/base.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -540,17 +540,17 @@ class Alert(object):
         self.marionette._send_message("sendKeysToDialog", body)
 
 
 class Marionette(object):
     """Represents a Marionette connection to a browser or device."""
 
     CONTEXT_CHROME = "chrome"  # non-browser content: windows, dialogs, etc.
     CONTEXT_CONTENT = "content"  # browser content: iframes, divs, etc.
-    DEFAULT_SOCKET_TIMEOUT = 60
+    DEFAULT_SOCKET_TIMEOUT = 65
     DEFAULT_STARTUP_TIMEOUT = 120
     DEFAULT_SHUTDOWN_TIMEOUT = 65  # Firefox will kill hanging threads after 60s
 
     def __init__(self, host="localhost", port=2828, app=None, bin=None,
                  baseurl=None, socket_timeout=DEFAULT_SOCKET_TIMEOUT,
                  startup_timeout=None, **instance_args):
         """Construct a holder for the Marionette connection.
 
--- a/testing/marionette/harness/marionette_harness/runner/base.py
+++ b/testing/marionette/harness/marionette_harness/runner/base.py
@@ -235,17 +235,17 @@ class MarionetteTextTestRunner(Structure
 
     def run(self, test):
         result = super(MarionetteTextTestRunner, self).run(test)
         result.printLogs(test)
         return result
 
 
 class BaseMarionetteArguments(ArgumentParser):
-    socket_timeout_default = 60.0
+    socket_timeout_default = 65.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)
@@ -342,17 +342,18 @@ class BaseMarionetteArguments(ArgumentPa
                           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.')
+                          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('--tag',
                           action='append', dest='test_tags',
                           default=None,