From 6339791e9cd30cec6178d6941b99dca8335fd59a Mon Sep 17 00:00:00 2001 From: Bart Vermeulen Date: Wed, 4 May 2022 08:59:10 +0200 Subject: [PATCH] Fixed the max retries to at least have 1 try and a delay has been added --- lib/src/flutter/runners/gherkin_integration_test_runner.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/flutter/runners/gherkin_integration_test_runner.dart b/lib/src/flutter/runners/gherkin_integration_test_runner.dart index 2dbe813..84c8327 100644 --- a/lib/src/flutter/runners/gherkin_integration_test_runner.dart +++ b/lib/src/flutter/runners/gherkin_integration_test_runner.dart @@ -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); } } }