Increase timeout for child exit on CI

This commit is contained in:
Kovid Goyal 2023-07-26 19:22:59 +05:30
parent 1c094a3b53
commit a74e93d241
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -304,7 +304,7 @@ class PTY:
if not q(): if not q():
raise TimeoutError(f'The condition was not met. Screen contents: \n {repr(self.screen_contents())}') raise TimeoutError(f'The condition was not met. Screen contents: \n {repr(self.screen_contents())}')
def wait_till_child_exits(self, timeout=10, require_exit_code=None): def wait_till_child_exits(self, timeout=20 if BaseTest.is_ci else 10, require_exit_code=None):
end_time = time.monotonic() + timeout end_time = time.monotonic() + timeout
while time.monotonic() <= end_time: while time.monotonic() <= end_time:
si_pid, status = os.waitpid(self.child_pid, os.WNOHANG) si_pid, status = os.waitpid(self.child_pid, os.WNOHANG)