From 57ef1adfff368c2d220c1c7ddf12bab596c4aaca Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Fri, 1 Mar 2024 13:02:30 +0000 Subject: [PATCH] Change test status when cancelling test --- framework/python/src/common/session.py | 7 +++++++ framework/python/src/core/testrun.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/python/src/common/session.py b/framework/python/src/common/session.py index ba65b4b63..f67303195 100644 --- a/framework/python/src/common/session.py +++ b/framework/python/src/common/session.py @@ -70,6 +70,13 @@ def get_finished(self): return self._finished def stop(self): + self.set_status('Stopping') + + # Set any in progress test results to Error + for test_result in self._results: + if test_result.result == 'In Progress': + test_result.result = 'Error' + self._finished = datetime.datetime.now() def _get_default_config(self): diff --git a/framework/python/src/core/testrun.py b/framework/python/src/core/testrun.py index f579eba26..2c62108ee 100644 --- a/framework/python/src/core/testrun.py +++ b/framework/python/src/core/testrun.py @@ -330,7 +330,7 @@ def stop(self): if self.get_net_orc().get_listener() is not None: self.get_net_orc().get_listener().stop_listener() - self.get_session().set_status('Stopping') + self.get_session().stop() self._stop_tests() self._stop_network(kill=True)