Skip to content

stop retry when same exceptions occurred #59

Open
@tmshft

Description

@tmshft

Hi, thank you for the great feature.

I'd like to stop retry when same exceptions will be occurred with exactly same error-message.
Because I think the flaky tests should retry but the broken tests should not retry.

example 1

@DisplayName("retry should be stop at Repetition 2 of 3")
@RepeatedIfExceptionsTest(repeats = 3,maxExceptions = 2)
public void reRunTestStopRetryIfSameExceptions2() {
    throw new RuntimeException("same error message");
}

example 2

@DisplayName("fail at Repetition 4 of 4(retry will not be stopped)")
@RepeatedIfExceptionsTest(repeats = 4,maxExceptions = 2)
public void reRunTestStopRetryIfSameExceptions3() {
    throw new RuntimeException("dynamic error message: " + random.nextInt());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions