diff --git a/.unreleased/allow_log_flush_to_fail_during_test_cleanup b/.unreleased/allow_log_flush_to_fail_during_test_cleanup new file mode 100644 index 000000000..e69de29bb diff --git a/nat-lab/tests/telio.py b/nat-lab/tests/telio.py index b0440ffc7..d6dc85b72 100644 --- a/nat-lab/tests/telio.py +++ b/nat-lab/tests/telio.py @@ -472,7 +472,16 @@ async def on_stderr(stderr: str) -> None: print(datetime.now(), "Test cleanup: Shutting down") if self._libtelio_proxy: - await self.get_proxy().flush_logs() + # flush_logs() is allowed to fail here: + try: + await self.get_proxy().flush_logs() + # Since this is clean up code, catching general exceptions is fine: + except Exception as e: # pylint: disable=broad-exception-caught + print( + datetime.now(), + f"Test cleanup: Exception while flushing logs: {e}", + ) + await self.get_proxy().shutdown(self._connection.target_name()) else: print(