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

JunitJupiterEngine: only reigster listeners when there are listeners to register #1288

Closed
turing85 opened this issue Jan 8, 2025 · 0 comments · Fixed by #1289
Closed

JunitJupiterEngine: only reigster listeners when there are listeners to register #1288

turing85 opened this issue Jan 8, 2025 · 0 comments · Fixed by #1289

Comments

@turing85
Copy link
Contributor

turing85 commented Jan 8, 2025

The JUnit Platform launcher does not like it if an empty array of listeners is registered:

https://github.com/junit-team/junit5/blob/0a552398fa6a87ec1a492b4b023ab7f6367618e7/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ListenerRegistry.java#L72-L77

But we call this method (indirectly) with a possibly empty array:

launcher.registerTestExecutionListeners(testExecutionListeners.toArray(TestExecutionListener[]::new));

We should only execute this call if the list of listeners is non-empty.

This fix is necessary to fix citrusframework/citrus-remote#21.

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

Successfully merging a pull request may close this issue.

1 participant