Skip to content

Commit bcfb787

Browse files
committed
add indirection to the exit function
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent ed17e4b commit bcfb787

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
## [Unreleased][]
44

5-
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.1...HEAD
5+
[Unreleased]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.2...HEAD
6+
7+
## [0.8.2][]
8+
9+
[0.8.2]: https://github.com/chaostoolkit/chaostoolkit-addons/compare/0.8.1...0.8.2
10+
11+
### Changed
12+
13+
- Indirection to the exeit function so we can override in tests
614

715
## [0.8.1][]
816

chaosaddons/controls/safeguards.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ def _wait_interruption(self) -> None:
209209
logger.critical(
210210
"Safeguard '{}' triggered the end of the experiment".format(
211211
self.triggered_by))
212-
exit_gracefully()
212+
self._exit()
213+
214+
def _exit(self) -> None:
215+
exit_gracefully()
213216

214217
def _log_finished(self, f: Future, probe: Probe) -> None:
215218
"""

0 commit comments

Comments
 (0)