Create a single LauncherSession for invocations of JUnitPlatformProvider by marcphilipp · Pull Request #863 · apache/maven-surefire (original) (raw)

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:

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.