Bug 1394381 - Add logging output for Marionette connection attempts. r=maja_zf
☠☠ backed out by e37dfd5884b7 ☠ ☠
authorHenrik Skupin <mail@hskupin.info>
Mon, 28 Aug 2017 17:46:06 +0200
changeset 428676 1e12a866239c8ab6d5ee68c31731d66a54733d81
parent 428675 c4a95bccc94f9a1c39879c13447c636145c9397d
child 428677 adba302ab807e36ee451eb944496b83de55ca053
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1394381, 1362293
milestone57.0a1
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
Bug 1394381 - Add logging output for Marionette connection attempts. r=maja_zf If Marionette client cannot connect to the server, the attempts have to be logged to stderr. This allows us to inspect the reason why a connection from the client could not be made, and that it still tries to connect (see bug 1362293). MozReview-Commit-ID: ElE1M73ums8
testing/marionette/client/marionette_driver/marionette.py
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -658,34 +658,34 @@ class Marionette(object):
         """
         if timeout is None:
             timeout = self.DEFAULT_STARTUP_TIMEOUT
 
         runner = None
         if self.instance is not None:
             runner = self.instance.runner
 
-        poll_interval = 0.1
+        poll_interval = 1
         starttime = datetime.datetime.now()
 
         while datetime.datetime.now() - starttime < datetime.timedelta(seconds=timeout):
             # 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
 
             sock = None
             try:
                 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                 sock.settimeout(0.5)
                 sock.connect((self.host, self.port))
                 data = sock.recv(16)
                 if ":" in data:
                     return True
-            except socket.error:
-                pass
+            except socket.error as e:
+                print >>sys.stderr, "Connection attempt to Marionette failed ({})".format(e)
             finally:
                 if sock is not None:
                     sock.close()
 
             time.sleep(poll_interval)
 
         return False