Skip to content

Commit

Permalink
Fix output of test_lowlevel tests in case of timeout (#6136)
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
  • Loading branch information
ogayot authored Jun 8, 2022
1 parent 0f358ea commit 3af2f45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/testserver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def _accept_connection(self):

def __enter__(self):
self.start()
self.ready_event.wait(self.WAIT_EVENT_TIMEOUT)
if not self.ready_event.wait(self.WAIT_EVENT_TIMEOUT):
raise RuntimeError("Timeout waiting for server to be ready.")
return self.host, self.port

def __exit__(self, exc_type, exc_value, traceback):
Expand Down

0 comments on commit 3af2f45

Please sign in to comment.