- Notifications
You must be signed in to change notification settings - Fork3k
Dispose of the FacadeClassLoader at the end of every test plan so surefire reruns are tolerated#51298
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
467a35e to733c292Comparegsmet commentedNov 28, 2025
I force pushed a reformat so that CI can run tonight. |
This is needed because the session launcher might stay open for several test runs if surefire reruns tests.
733c292 to6bf4f0aComparequarkus-botbot commentedNov 28, 2025 • edited by github-actionsbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by github-actionsbot
Uh oh!
There was an error while loading.Please reload this page.
Status for workflow |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#51269.
The current problem in CI (and for users) was caused by#50092, which bumped surefire from 3.5.3 to 3.5.4. We didn't catch it because (a) thetests for maven reruns wasn't merged and (b) they didn't lock the version of surefire to the one used by the rest of the build, so they wouldn't have caught the regression. I've confirmed that when I do add the version, the tests start failing, and this PR gets them passing again.
The root cause was thatapache/maven-surefire#863 changed how surefire handled
LauncherSessionsso that one session was created for the whole process, rather than one for each test run. That meant that on runs after the first one, the rerun tests would still be loaded with the 'old' classloader and attached to the previous app. I worried this would be hard to fix the hooking the end of the test execution allows us to close everything at the right point.