Skip to content

Commit

Permalink
added more exception logging in cchost.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vimauro committed Aug 31, 2023
1 parent dd5fbd2 commit 2625d37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/infra/cchost.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ async def _wait_for_process(self, process: asyncio.subprocess.Process) -> None:

if process.returncode != 0:
raise RuntimeError(
f"cchost process terminated with a non-zero status: {process.returncode}\nError output: {process.stderr.read()}"
f"cchost process terminated with a non-zero status: {process.returncode}"
)

# The only way we can reach this point is if cchost terminates with a
Expand Down Expand Up @@ -315,9 +315,10 @@ async def _poll_ready(self) -> Optional[int]:
await asyncio.open_connection("127.0.0.1", int(port), ssl=ssl_ctx)

return int(port)
except OSError:
except OSError as ex:
# Assume the service is not ready yet. Either we failed to read the
# ports file, or we couldn't establish a connection to it.
LOG.exception(f"Exception while establishing a connection: {ex}")
return None

def _populate_workspace(self, start=True):
Expand Down

0 comments on commit 2625d37

Please sign in to comment.