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

NullPointerException if RepeatedTest is cancelled #66

Open
greenflash1986 opened this issue Nov 2, 2021 · 0 comments
Open

NullPointerException if RepeatedTest is cancelled #66

greenflash1986 opened this issue Nov 2, 2021 · 0 comments

Comments

@greenflash1986
Copy link

We get an NullPointerException if we abort a test which is annotated with RepeatedIfExceptionsTest. Assume there is an JUnit5 extension to stop further test exectuions if there is some condition (see below). If the condition is met we will get a NPE in RepeatIfExceptionsExtension line 131 because repeatableExceptions is uninitialized.

public void beforeTestExecution(ExtensionContext context) throws Exception {
	if (<some condition to stop further test exectution>) {
		throw new TestAbortedException("Cancel this test");
	}
}
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