oscerd commented on PR #9065:
URL: https://github.com/apache/camel-quarkus/pull/9065#issuecomment-5425453621
`functional-extension-tests` was failing on this PR and it was my fault, not
a flake.
`CamelDebugEnabledTest` drove the supplier through system properties and
released the config registered for the class loader after each case, so that
SmallRye would pick the new values up. Surefire shares one JVM, so that left
everything after it without a configuration:
```
java.lang.IllegalArgumentException: SRCFG00015: No configuration is
available for this class loader
at
io.quarkus.test.QuarkusDevModeTest.beforeEach(QuarkusDevModeTest.java:302)
```
`CamelDevModeProfileTest` and `CamelDevModeSingletonBeanTest` both died on
it. My own five assertions passed throughout, and running the class on its own
passed too, which is exactly how it got through review locally.
Fixed by extracting `isDebugEnabled(Config)` from the supplier.
`getAsBoolean()` still passes `ConfigProvider.getConfig()` into it, so runtime
behaviour is unchanged, but each test case now builds its own `SmallRyeConfig`
and touches no global state.
The whole `camel-quarkus-core-deployment` suite passes locally now — 78
tests, 0 failures, 0 errors, against `Errors: 2` before. `./mvnw clean install
-DskipTests` from the root is also green with no regenerated artifacts left
behind.
The test is still a genuine regression test, and hermetic now: 3 of the 5
cases fail against the previous presence-scan implementation. It used to be 4,
because `notEnabledWhenUnconfigured` only failed thanks to `camel.debug.*`
properties leaking in from sibling cases — the very problem this removes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]