Skip to content

[3.27] Backport detection of Junit misconfiguration#53538

Open
holly-cummins wants to merge 3 commits intoquarkusio:3.27from
holly-cummins:backport-52350
Open

[3.27] Backport detection of Junit misconfiguration#53538
holly-cummins wants to merge 3 commits intoquarkusio:3.27from
holly-cummins:backport-52350

Conversation

@holly-cummins
Copy link
Copy Markdown
Contributor

Backport of #52350.

See discussion.

I've kept most of the original code, but downgraded the exception to a warning.

@holly-cummins holly-cummins requested a review from a team April 10, 2026 11:03
@quarkus-bot quarkus-bot bot changed the title Backport detection of Junit misconfiguration [3.27] Backport detection of Junit misconfiguration Apr 10, 2026
@quarkus-bot
Copy link
Copy Markdown

quarkus-bot bot commented Apr 10, 2026

/cc @aloubyansky (3.27), @gastaldi (3.27), @gsmet (3.27), @jmartisk (3.27), @rsvoboda (3.27)

@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

Copy link
Copy Markdown
Member

@cescoffier cescoffier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one commit (well a question actually)


if (orderer.isEmpty() || !orderer.get().equals(DESIRED_CLASS_ORDERER.getName())) {
if (facadeLoader.hasMultipleClassLoaders()) {
String message = getFailureMessageForJUnitMisconfiguration(orderer);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be null?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The orderer, or the facade classloader? (It's a reasonable question for both.)

For the orderer, the JUnit API returns Optional, so I think I can assume it's not null, and I do the isEmpty check.

For FacadeClassLoader, I thought it couldn't be null, but looking more closely, we null it out in launcherSessionClosed and testPlanExecutionFinished. This usage is in launcherDiscoveryFinished. In any normal execution that would always be first, but the JUnit interaction with things like gradle does cause the order to go a bit wonky sometimes. I'll add a null check to be sure.

(We also use the FCL two lines earlier, but only in dev mode.)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants