Skip to content

Commit

Permalink
servodriver: increase browser’s init_timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Jul 20, 2018
1 parent 45b710b commit 2b5bba6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -73,6 +73,7 @@ def write_hosts_file(config):

class ServoWebDriverBrowser(Browser):
used_ports = set()
init_timeout = 300 # Large timeout for cases where we're booting an Android emulator

def __init__(self, logger, binary, debug_info=None, webdriver_host="127.0.0.1",
server_config=None, binary_args=None, user_stylesheets=None):
Expand Down Expand Up @@ -166,4 +167,5 @@ def cleanup(self):
def executor_browser(self):
assert self.webdriver_port is not None
return ExecutorBrowser, {"webdriver_host": self.webdriver_host,
"webdriver_port": self.webdriver_port}
"webdriver_port": self.webdriver_port,
"init_timeout": self.init_timeout}
Expand Up @@ -88,12 +88,12 @@ def __init__(self, executor, browser, capabilities, **kwargs):
self.capabilities = capabilities
self.host = browser.webdriver_host
self.port = browser.webdriver_port
self.init_timeout = browser.init_timeout
self.session = None

def connect(self):
"""Connect to browser via WebDriver."""
# Large timeout for the case where we're booting an Android emulator.
wait_for_service((self.host, self.port), timeout=300)
wait_for_service((self.host, self.port), timeout=self.init_timeout)

self.session = webdriver.Session(self.host, self.port, extension=ServoCommandExtensions)
self.session.start()
Expand Down

0 comments on commit 2b5bba6

Please sign in to comment.