Skip to content

Conversation

@marcphilipp
Copy link
Contributor

Prior to this commit, JUnitPlatformProvider created multiple LauncherSessions for some executions, for example when forkTestSet was null or when rerunning failed tests. This caused registered LauncherSessionListeners registered via ServiceLoader on the JUnit Platform to be called multiple times. As they are intended to set up and tear down resources, this had the potential of unnecessarily slowing down test execution.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its clean install).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

Prior to this commit, `JUnitPlatformProvider` created multiple
`LauncherSessions` for some executions, for example when `forkTestSet`
was `null` or when rerunning failed tests. This caused registered
`LauncherSessionListeners` registered via `ServiceLoader` on the JUnit
Platform to be called multiple times. As they are intended to set up and
tear down resources, this had the potential of unnecessarily slowing
down test execution.
@Bukama
Copy link
Contributor

Bukama commented Jul 3, 2025

Hey @marcphilipp Thanks for the PR! Would you call this a bugfix (as not intended to use this way) or enhancement?

@marcphilipp
Copy link
Contributor Author

I think it's not strictly a bug so I would call it an enhancement. 🙂

@olamy
Copy link
Member

olamy commented Jul 4, 2025

Looks like an excellent change. Thanks for this.

@olamy olamy merged commit bfa3cca into apache:master Jul 4, 2025
26 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Sovereign Tech Fund Jul 4, 2025
@github-actions
Copy link

github-actions bot commented Jul 4, 2025

@olamy The PR can't be associated to a milestone, because there are multiple open milestones. Please add the text "branch: master" to the description to the milestone where this PR belongs to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants