From 5f3f142949c63cb682e7e9f5fd58b12e5dd3b03c Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Tue, 23 Jul 2024 14:54:13 +0800 Subject: [PATCH] fix MockAdbProcess wait hangs bug (#1012) --- uiautomator2/core.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uiautomator2/core.py b/uiautomator2/core.py index 3ab3588..0feb227 100644 --- a/uiautomator2/core.py +++ b/uiautomator2/core.py @@ -50,9 +50,8 @@ def output(self) -> bytes: """ subprocess do not have this property """ return self._output - def wait(self) -> int: - self._event.wait() - return 0 + def wait(self) -> bool: + return self._event.wait(timeout=3) def pool(self) -> Optional[int]: if self._event.is_set():