-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
io.quarkus.logging.Log and @InjectMock fails on Native Image Testing with @QuarkusIntegrationTest #34387
Comments
/cc @geoand (testing) |
I can't say I understand what is being reported here as there are multiple things being described. Can you attach a sample project that exhibits the problem you describe? |
Done! https://github.com/gian1200/quarkus-34387-reproducer Command:
|
Thanks. This is actually expected behavior as |
In my reproducer I didn't use Panache at all. Did you mean Inject and logging in general? I guess I didn't understand Thanks for the clarification. |
I meant Panache Logging. The integration tests are block box tests, meaning they are not part of the application and can only interact with it over the wire. |
Describe the bug
When testing with
@QuarkusIntegrationTest
, some test fail."Quarkus magic" for io.quarkus.logging.Log seems to fail only when it is defined in @QuarkusTest class. It works fine on regular beans (
@ApplicationScoped
). It fails on bothprod
andtest
native build/run profiles.Code fragment:
Command:
mvnw verify -Pnative -Dquarkus.profile=test -Dquarkus.test.native-image-profile=test
Expected behavior
All tests should have the same result as test run on Java
Actual behavior
Log:
How to Reproduce?
@InjectMock
andio.quarkus.logging.Log
inside@QuarkusTest
classmvnw verify -Pnative -Dquarkus.profile=test -Dquarkus.test.native-image-profile=test
Output of
uname -a
orver
No response
Output of
java -version
GraalVM 22.3.2 Java 17 CE (Java Version 17.0.7+7-jvmci-22.3-b18)
GraalVM version (if different from Java)
GraalVM 22.3.2
Quarkus version or git rev
2.16.7.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.8
Additional information
x64 Native Tools Command Prompt for VS 2022
Related:
The text was updated successfully, but these errors were encountered: