Fixed the max retries to at least have 1 try and a delay has been added

This commit is contained in:
Bart Vermeulen 2022-05-04 08:59:10 +02:00
parent eb3827c369
commit 6339791e9c
1 changed files with 3 additions and 1 deletions

View File

@ -302,7 +302,7 @@ abstract class GherkinIntegrationTestRunner {
result = new StepResult(
0, StepExecutionResult.skipped, "Previous step(s) failed.");
} else {
for (int i = 0; i < this.configuration.stepMaxRetries; i++) {
for (int i = 0; i < this.configuration.stepMaxRetries + 1; i++) {
result = await executable.step.run(
dependencies.world,
reporter,
@ -311,6 +311,8 @@ abstract class GherkinIntegrationTestRunner {
);
if (!_isNegativeResult(result.result)) {
break;
} else {
await Future.delayed(this.configuration.retryDelay);
}
}
}