Skip to content

Commit

Permalink
add indirection to the exit function
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
  • Loading branch information
Lawouach committed Mar 30, 2023
1 parent ed17e4b commit bcfb787
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

## [Unreleased][]

[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.1...HEAD
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.2...HEAD

## [0.8.2][]

[0.8.2]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.1...0.8.2

### Changed

- Indirection to the exeit function so we can override in tests

## [0.8.1][]

Expand Down
5 changes: 4 additions & 1 deletion chaosaddons/controls/safeguards.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ def _wait_interruption(self) -> None:
logger.critical(
"Safeguard '{}' triggered the end of the experiment".format(
self.triggered_by))
exit_gracefully()
self._exit()

def _exit(self) -> None:
exit_gracefully()

def _log_finished(self, f: Future, probe: Probe) -> None:
"""
Expand Down

0 comments on commit bcfb787

Please sign in to comment.