-
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
Logging doesn't work on integration test (@QuarkusIntegrationTest) #20303
Comments
/cc @geoand |
Which logging is not working? In your reproducer I see logs in both the console and |
@geoand - in the GreetingResourceIT test class, the logging code: |
Ah, you mean from the test itself, gotcha. |
yes, and actually not only in the test class, but in every class located in the "test" folders or outside of the quarkus app classes |
Enable logging from integration tests
Fixes: quarkusio#20303 (cherry picked from commit 41ade96)
I'm experiencing the same problem. I see this issue is closed, but was it fixed? Do I need to add any configuration to my @QuarkusIntegrationTest to make the logging from the underlying services/application visible in the log? I'm using quarkus-platform version 2.12.3.Final. |
Nope, it should just work |
It doesn't but maybe I configured something wrong? I have a test like this where I override
Then in my Resource class I have something like:
And the
Furthermore I have an
When I run the test from Intellij, I don't see anything being logged in the log files whereas I would have expected the logging from the MyResource to be there. I've also tried just to write to |
Have you checked |
Yes, the only thing I see there is:
And an empty log file /tmp/logs/test/files-repository (which comes from the test profile settings and not from the prod or integration profile settings. |
Describe the bug
When running integration tests in Quarkus, ie. test classes annotated with @QuarkusIntegrationTest, logging doesn't work for any of the classes used in both the test and the quarkus app itself. Nothing is displayed in the logs.
For maven-failsafe-plugin plugin, I applied the same configuration I followed for the @QuarkusTest annotated classes which work fine, but in this case, the same configuration applied to "maven-failsafe-plugin" doesn't seem to work.
I followed this doc https://quarkus.io/guides/logging#how-to-configure-logging-for-quarkustest
Expected behavior
Logging should be displayed properly either in the logs or in the console for both integration test and app classes when running integration test (@QuarkusIntegrationTest)
Actual behavior
No log is shown
How to Reproduce?
Reproducer:
reproducer.zip
Output of
uname -a
orver
Linux antferna.remote.csb 4.18.0-305.17.1.el8_4.x86_64 #1 SMP Mon Aug 30 07:26:31 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "11.0.12" 2021-07-20 LTS
GraalVM version (if different from Java)
none
Quarkus version or git rev
2.2.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven 3.6.3
Additional information
No response
The text was updated successfully, but these errors were encountered: