Bug 1433873 - Possible fixes for Android.
MozReview-Commit-ID: 41GHWfLKiQc
--- a/testing/marionette/client/marionette_driver/geckoinstance.py
+++ b/testing/marionette/client/marionette_driver/geckoinstance.py
@@ -193,17 +193,17 @@ class GeckoInstance(object):
self._update_profile(value)
def _update_profile(self, profile=None, profile_name=None):
"""Check if the profile has to be created, or replaced
:param profile: A Profile instance to be used.
:param name: Profile name to be used in the path.
"""
- if self.runner and self.runner.is_running():
+ if self.runner and self.runner.wait(timeout=0) is None:
raise errors.MarionetteException("The current profile can only be updated "
"when the instance is not running")
if isinstance(profile, Profile):
# Only replace the profile if it is not the current one
if hasattr(self, "_profile") and profile is self._profile:
return
--- a/testing/marionette/client/marionette_driver/marionette.py
+++ b/testing/marionette/client/marionette_driver/marionette.py
@@ -688,17 +688,17 @@ class Marionette(object):
starttime = datetime.datetime.now()
timeout_time = starttime + datetime.timedelta(seconds=timeout)
client = transport.TcpTransport(self.host, self.port, 0.5)
connected = False
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():
+ if runner and runner.wait(timeout=0) is not None:
break
try:
client.connect()
return True
except socket.error:
pass
finally: