Skip to content

Commit

Permalink
Save exception in RemoteResource
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxuan-ms committed Dec 27, 2024
1 parent 9f93423 commit 84442ee
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions testplan/common/remote/remote_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ def __init__(
self.python_binary = (
os.environ["PYTHON3_REMOTE_BINARY"] if IS_WIN else sys.executable
)
self._error_exec = []

@property
def error_exec(self) -> list:
return self._error_exec

def _prepare_remote(self) -> None:

Expand Down Expand Up @@ -584,7 +589,8 @@ def _fetch_results(self) -> None:
if self.cfg.pull:
self._pull_files()
except Exception as exc:
self.logger.debug(
self._error_exec.append(exc)
self.logger.warning(
"While fetching result from worker [%s]: %s", self, exc
)

Expand Down Expand Up @@ -614,7 +620,8 @@ def _pull_files(self) -> None:
exclude=self.cfg.pull_exclude,
)
except Exception as exc:
self.logger.debug(
self._error_exec.append(exc)
self.logger.warning(
"While fetching result from worker [%s]: %s", self, exc
)

Expand Down

0 comments on commit 84442ee

Please sign in to comment.