Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop retry when same exceptions occurred #59

Open
tmshft opened this issue Dec 30, 2020 · 0 comments
Open

stop retry when same exceptions occurred #59

tmshft opened this issue Dec 30, 2020 · 0 comments

Comments

@tmshft
Copy link

tmshft commented Dec 30, 2020

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());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant