Summary
Quarkus tests fail in Eclipse after upgrading because Quarkus 3.22+ introduced a rewritten test classloading system, and Eclipse’s built‑in JUnit launcher is not yet fully compatible with the new QuarkusClassLoader expectations.
Root Cause
- Quarkus 3.22 introduced a major rewrite of the test classloading internals, specifically affecting
@QuarkusTest. - Eclipse still launches tests using the standard AppClassLoader, not the QuarkusClassLoader required by the new test infrastructure.
- The FacadeClassLoader fails to detect the test as a Quarkus test, causing the runtime error you observed.
Why This Happens in Real Systems
- IDEs often lag behind framework-level classloader changes.
- Quarkus uses complex, multi‑stage classloading to simulate the dev/test environment, which is fragile when IDEs bypass the intended bootstrap path.
- Upgrades that modify classloading internals frequently break assumptions made by IDE test runners.
Real-World Impact
- Tests run fine via Maven/CLI but fail inside Eclipse, causing:
- Broken local workflows
- Inconsistent test results between developers
- Confusion due to tests passing in CI but failing in the IDE
- Time lost debugging non‑application issues
Example or Code (if necessary and relevant)
A typical failing test looks like this:
@QuarkusTest
class FooBarTest {
// test code
}
Running this in Eclipse triggers the error because Eclipse loads it with the AppClassLoader instead of the QuarkusClassLoader.
How Senior Engineers Fix It
- Run tests via Maven or Gradle until Eclipse updates its Quarkus tooling.
- Use the Quarkus CLI (
quarkus test) which correctly initializes the QuarkusClassLoader. - Update Eclipse Quarkus and JDT extensions to the latest available versions.
- Switch to IntelliJ or VS Code temporarily if IDE‑integrated Quarkus testing is critical.
- Track the upstream issue in the Quarkus GitHub repository to know when a fix lands.
Why Juniors Miss It
- They assume IDE test runners behave the same as CLI builds, which is not true for Quarkus.
- They often don’t understand classloader boundaries, especially Quarkus’s layered model.
- They expect that upgrading a framework is isolated, not realizing IDE integrations must also evolve.
- They may not read release notes that mention breaking changes in test infrastructure.