Skip to content

Commit 1cafe5f

Browse files
jgrahammoz-wptsync-bot
authored andcommitted
Bug 1885150 [wpt PR 45084] - Retry emulator.wait_for_start() if it fails, a=testonly
Automatic update from web-platform-tests Retry emulator.wait_for_start() if it fails -- wpt-commits: a4a6ea8eac94cfb6f3466a3aed5c0b3986ee0553 wpt-pr: 45084
1 parent 61ba7cf commit 1cafe5f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

testing/web-platform/tests/tools/wpt/android.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,16 @@ def start(logger, dest=None, reinstall=False, prompt=True, device_serial=None):
325325
emulator.start()
326326
timer = threading.Timer(300, cancel_start(threading.get_ident()))
327327
timer.start()
328-
emulator.wait_for_start()
328+
for i in range(10):
329+
logger.info(f"Wait for emulator to start attempt {i + 1}/10")
330+
try:
331+
emulator.wait_for_start()
332+
except Exception:
333+
import traceback
334+
logger.warning(f"""emulator.wait_for_start() failed:
335+
{traceback.format_exc()}""")
336+
else:
337+
break
329338
timer.cancel()
330339
return emulator
331340

0 commit comments

Comments
 (0)