Skip to content

Commit

Permalink
Added scenario retries info params (#209)
Browse files Browse the repository at this point in the history
* Added scenario retries info params

Signed-off-by: Piotr Nestorow <piotr.nestorow@systemverification.com>

* Handle currentScenario.Retries is null

Signed-off-by: Piotr Nestorow <piotr.nestorow@systemverification.com>

---------

Signed-off-by: Piotr Nestorow <piotr.nestorow@systemverification.com>
  • Loading branch information
PiotrNestor committed Mar 8, 2024
1 parent 0f3b176 commit 33dc6ea
Show file tree
Hide file tree
Showing 5 changed files with 485 additions and 190 deletions.
6 changes: 5 additions & 1 deletion src/ExecutionInfoMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ private dynamic SpecificationFrom(SpecInfo currentSpec)
private dynamic ScenarioFrom(ScenarioInfo currentScenario)
{
var executionContextScenarioType = _executionContextType.GetNestedType("Scenario");
if (currentScenario != null && currentScenario.Retries == null)
{
currentScenario.Retries = new ScenarioRetriesInfo{MaxRetries=0, CurrentRetry=0};
}
return currentScenario != null
? activatorWrapper.CreateInstance(executionContextScenarioType, currentScenario.Name, currentScenario.IsFailed,
currentScenario.Tags.ToArray())
currentScenario.Tags.ToArray(), currentScenario.Retries.MaxRetries, currentScenario.Retries.CurrentRetry)
: activatorWrapper.CreateInstance(executionContextScenarioType);
}

Expand Down
Loading

0 comments on commit 33dc6ea

Please sign in to comment.