radcortez commented on code in PR #6191: URL: https://github.com/apache/camel-quarkus/pull/6191#discussion_r1642583327
########## extensions/jasypt/deployment/src/test/java/org/apache/camel/quarkus/component/jasypt/JasyptPasswordNotProvidedTest.java: ########## @@ -25,11 +28,27 @@ public class JasyptPasswordNotProvidedTest { @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() + .overrideConfigKey("greeting.secret", "ENC(GKJfy64eBDzxUuQCfArd6OjnAaW/oM9e)") .setExpectedException(IllegalStateException.class) - .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class).addClass(JasyptRoutes.class)); @Test void passwordNotProvidedThrowsException() { // Nothing to test as we just verify the application fails to start } + + public static final class JasyptRoutes extends RouteBuilder { Review Comment: Because the secret key is now lazy, it does not initialize when the Config starts (on application start), but when it is called. Without the route, the application starts fine (instead of the expected exception) because the secret handle is never invoked, so we need to force it. -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org