Skip to content

Commit 35074e2

Browse files
committed
Ensure events are fired
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent e46e362 commit 35074e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chaoslib/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ def run_gate_hypothesis(experiment: Experiment, journal: Journal,
460460
state = run_steady_state_hypothesis(
461461
experiment, configuration, secrets, dry=dry)
462462
journal["steady_states"]["before"] = state
463+
event_registry.hypothesis_before_completed(experiment, state, journal)
463464
if state is not None and not state["steady_state_met"]:
464465
journal["steady_states"]["before"] = state
465466
journal["status"] = "failed"
@@ -470,7 +471,6 @@ def run_gate_hypothesis(experiment: Experiment, journal: Journal,
470471
"tolerance so failing this experiment".format(
471472
p=p["activity"]["name"]))
472473
return
473-
event_registry.hypothesis_before_completed(experiment, state, journal)
474474
return state
475475

476476

@@ -490,6 +490,7 @@ def run_deviation_validation_hypothesis(experiment: Experiment,
490490
state = run_steady_state_hypothesis(
491491
experiment, configuration, secrets, dry=dry)
492492
journal["steady_states"]["after"] = state
493+
event_registry.hypothesis_after_completed(experiment, state, journal)
493494
if state is not None and \
494495
not state["steady_state_met"]:
495496
journal["deviated"] = True
@@ -500,7 +501,6 @@ def run_deviation_validation_hypothesis(experiment: Experiment,
500501
"given tolerance so failing this "
501502
"experiment".format(
502503
p=p["activity"]["name"]))
503-
event_registry.hypothesis_after_completed(experiment, state, journal)
504504
return state
505505

506506

0 commit comments

Comments
 (0)