Skip to content

Commit

Permalink
fix(scenario-engine): Duplicated invocation of scenario callback
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyaPeyaPeyang committed Nov 2, 2023
1 parent 63099c2 commit 6d4e020
Showing 1 changed file with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,6 @@ public QueuedScenarioImpl(
this.running = false;
this.result = result;
this.finishedAt = System.currentTimeMillis();
if (this.callback != null)
this.callback.accept(result);
}

@Override
public ScenarioResult run() throws TriggerNotFoundException
{
this.onStart();
ScenarioResult result = this.manager.runScenario(this.engine, this.trigger);
this.onFinished(result);

if (this.callback != null)
try
{
Expand All @@ -70,6 +59,15 @@ public ScenarioResult run() throws TriggerNotFoundException
this.manager.getRegistry().getExceptionHandler().report(e);
}

}

@Override
public ScenarioResult run() throws TriggerNotFoundException
{
this.onStart();
ScenarioResult result = this.manager.runScenario(this.engine, this.trigger);
this.onFinished(result);

return result;
}

Expand Down

0 comments on commit 6d4e020

Please sign in to comment.