Continuous testing issue
See original GitHub issueHi,
Nice project. I’m using it with Quarkus and it works great except for continuous testing. Not sure what Quarkus is doing behind the scene with the classpath, but this line causes issues: https://github.com/dasniko/testcontainers-keycloak/blob/main/src/main/java/dasniko/testcontainers/keycloak/KeycloakContainer.java#L185
I replaced it with:
new ObjectMapper().readValue(Thread.currentThread().getContextClassLoader().getResource(importFile), RealmRepresentation.class)
And it seems to work, but then I have another issue. I work on the first execution, but starting from the second one I got something really weird:
Caused by: java.lang.RuntimeException: Unable to start Quarkus test resource ch.koalasense.resource.KeycloakResource@4e20583b
at io.quarkus.test.common.TestResourceManager$TestResourceEntryRunnable.run(TestResourceManager.java:457)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
... 3 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Container startup failed
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:336)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:317)
at ch.koalasense.resource.KeycloakResource.start(KeycloakResource.java:21)
at io.quarkus.test.common.TestResourceManager$TestResourceEntryRunnable.run(TestResourceManager.java:452)
... 4 more
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:329)
... 7 more
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:525)
at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:331)
at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
... 8 more
Caused by: java.lang.RuntimeException: RESTEASY003940: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.core.providerfactory.CommonProviders.processProviderContracts(CommonProviders.java:93)
at org.jboss.resteasy.core.providerfactory.ClientHelper.processProviderContracts(ClientHelper.java:104)
at org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl.processProviderContracts(ResteasyProviderFactoryImpl.java:841)
at org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl.registerProvider(ResteasyProviderFactoryImpl.java:829)
at org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl.register(ResteasyProviderFactoryImpl.java:1506)
at org.jboss.resteasy.core.providerfactory.ResteasyProviderFactoryImpl.register(ResteasyProviderFactoryImpl.java:105)
at org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl.register(ResteasyClientBuilderImpl.java:479)
at org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl.register(ResteasyClientBuilderImpl.java:47)
at org.keycloak.admin.client.Keycloak.newRestEasyClient(Keycloak.java:71)
at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:78)
at org.keycloak.admin.client.Keycloak.getInstance(Keycloak.java:94)
at dasniko.testcontainers.keycloak.KeycloakContainer.getKeycloakAdminClient(KeycloakContainer.java:323)
at dasniko.testcontainers.keycloak.KeycloakContainer.containerIsStarted(KeycloakContainer.java:180)
at org.testcontainers.containers.GenericContainer.containerIsStarted(GenericContainer.java:688)
at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:504)
... 10 more
Caused by: java.lang.NullPointerException: Cannot invoke "io.quarkus.arc.ArcContainer.instanceSupplier(java.lang.Class, java.lang.annotation.Annotation[])" because the return value of "io.quarkus.arc.Arc.container()" is null
at io.quarkus.resteasy.common.runtime.QuarkusConstructorInjector.construct(QuarkusConstructorInjector.java:35)
at org.jboss.resteasy.core.providerfactory.Utils.createProviderInstance(Utils.java:102)
at org.jboss.resteasy.core.providerfactory.CommonProviders.processProviderContracts(CommonProviders.java:87)
... 24 more
It seems like the Arc container is null and not initialized for some reason.
I didn’t see any mention of continuous testing in this repo nor in your presentation video. I’m wondering if you were able to make it work ?
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Common Challenges in Continuous Testing - Testsigma
Common Challenges in Continuous Testing · 1. Lack of Testability Support in Products: · 2. Lack of Standard Tools: · 3. Lack of...
Read more >Top 5 Continuous Testing Challenges and How to Tackle Them
Teams fail to speed up the delivery process of quality software due to unable to achieve continuous testing with unsolved challenges.
Read more >What is Continuous Testing and How Does it Work? - Synopsys
Instead, testing happens continuously, enabling real-time proactive fixes to code quality and security issues. Multiple activities can occur simultaneously.
Read more >What Is Continuous Testing? A Straightforward Introduction
Continuous testing provides an automated, end-to-end testing solution that can integrate with an existing development process. It can eliminate errors and ...
Read more >What is Continuous Testing? The 3 Keys to Successful Testing
Software testing and QA therefore address different issues but how they work together may be critical in delivering the best software to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With KC 18 and the default realm-import feature, the custom admin-client code was removed. It’s currently in the
main
branch, not yet released. Release will follow the next few days.Have it merged, you can use it with Jitpack and a snapshot of the main-branch. I’d rather wait for KC18 to publish a new release.