Skip to content

Commit d6b7c6e

Browse files
authored
Fix iOS wptrunner to wait for simulator start. (#46292)
* Fix iOS wptrunner to wait for simulator start.
1 parent 431f8d3 commit d6b7c6e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tools/wptrunner/wptrunner/browsers/chrome_ios.py

+18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# mypy: allow-untyped-defs
22

3+
import traceback
34
from .base import WebDriverBrowser, require_arg
45
from .base import get_timeout_multiplier # noqa: F401
6+
from ..environment import wait_for_service
57
from ..executors import executor_kwargs as base_executor_kwargs
68
from ..executors.base import WdspecExecutor # noqa: F401
79
from ..executors.executorchrome import ChromeDriverPrintRefTestExecutor # noqa: F401
@@ -60,3 +62,19 @@ class ChromeiOSBrowser(WebDriverBrowser):
6062
def make_command(self):
6163
return ([self.webdriver_binary, f"--port={self.port}"] +
6264
self.webdriver_args)
65+
66+
def start(self, group_metadata, **kwargs):
67+
super().start(group_metadata, **kwargs)
68+
try:
69+
wait_for_service(
70+
self.logger,
71+
self.host,
72+
self.port,
73+
timeout=self.init_timeout,
74+
server_process=self._proc,
75+
)
76+
except Exception:
77+
self.logger.error(
78+
"WebDriver was not accessible "
79+
f"within the timeout:\n{traceback.format_exc()}")
80+
raise

0 commit comments

Comments
 (0)