@NativeImageTest and Integration Test with @Inject. Any solution? #24775
Replies: 1 comment
-
It would be possible for Quarkus to just build a new CDI context for the integration tests, and build all necessary beans a second time in the test JVM. This would be handy for some cases, like yours. But it would also be very confusing in many other cases, as then there would be in fact two instances; and a lot of unit tests that use You'll have to find a different method to create your BTW: Maybe you should find a better abstraction than using |
Beta Was this translation helpful? Give feedback.
-
Nowadays there is some way to run a
@NativeImageTest
extending from aQuarkusIntegrationTest
with@Inject
?I have an integration test that injects a
PgPool
but the test fails when building the binary:If not, how do you manage this situation when we need a real bean to perform a real operation?
Beta Was this translation helpful? Give feedback.
All reactions