Skip to content

Commit 9292a5d

Browse files
committed
tweak java impl of retries handling
1 parent fd3c931 commit 9292a5d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

java/src/main/java/io/cucumber/prettyformatter/SummaryReportWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private static String formatAttempt(TestCaseStarted testCaseStarted) {
224224
if (attempt == 0) {
225225
return "";
226226
}
227-
return ", after " + attempt + " attempts";
227+
return ", after " + (attempt + 1) + " attempts";
228228
}
229229

230230
private String formatLocationComment(Pickle pickle) {

testdata/src/retry.cucumber.summary.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Failed scenarios:
3-
1) Test cases won't retry after failing more than the --retry limit, after 2 attempts # samples/retry/retry.feature:17
3+
1) Test cases won't retry after failing more than the --retry limit, after 3 attempts # samples/retry/retry.feature:17
44
Error: Exception in step
55
samples/retry/retry.feature:18
66

testdata/src/retry.plain.summary.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Failed scenarios:
3-
1) Test cases won't retry after failing more than the --retry limit, after 2 attempts # samples/retry/retry.feature:17
3+
1) Test cases won't retry after failing more than the --retry limit, after 3 attempts # samples/retry/retry.feature:17
44
Error: Exception in step
55
samples/retry/retry.feature:18
66

0 commit comments

Comments
 (0)