Skip to content

Commit

Permalink
mavsdk_tests: raise timeout for czspawn
Browse files Browse the repository at this point in the history
And provide better output about what happened.
  • Loading branch information
julianoes committed Apr 3, 2020
1 parent 9c04f66 commit be9f125
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/mavsdk_tests/process_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def start(self) -> None:
self.thread = threading.Thread(target=self.process_output)
self.thread.start()
if self.wait_until_complete:
if self.wait(5.0) != 0:
raise TimeoutError("Command not completed")
timeout_s = 10.0
if self.wait(timeout_s) != 0:
raise TimeoutError("Command '{}' not completed within {}"
.format(self.cmd, timeout_s))

def process_output(self) -> None:
assert self.process.stdout is not None
Expand Down

0 comments on commit be9f125

Please sign in to comment.