quarkus: No logs on exception in QuarkusTestResourceLifecycleManager.start
Describe the bug Imagine having a QuarkusTestResourceLifecycleManager, which might throw an exception, if you have got a bug in your manager or haven’t properly prepared your environment. If this manager throws an exception in the start method, no logs except the thrown exception are outputted on console.
Expected behavior All logs, including already logged messages and the stack trace of the uncaught exception, are logged.
Actual behavior Only the stack trace of the uncaught exception are logged.
To Reproduce Steps to reproduce the behavior:
- Create a test using a QuarkusTestResourceManager.
- In the QuarkusTestResourceLifecycleManager, log something and throw a RuntimeException.
- See the log not containing the logged entry from the manager.
Environment (please complete the following information):
- Output of
uname -aorver: - Output of
java -version: Linux xxx 4.4.0-17763-Microsoft #1217-Microsoft Mon May 05 16:09:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux openjdk version “11.0.7” 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode) - GraalVM version (if different from Java): -
- Quarkus version or git rev: 1.6.0.Final
- Build tool (ie. output of
mvnw --versionorgradlew --version): Apache Maven 3.6.3
Additional context https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/No.20logs.20on.20exception.20in.20QTestResourceLifecycleManager.2Estart
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (13 by maintainers)
@Legion2 can you open a new issue. I think I had the same issue the other day and came up with a fix but didn’t have a chance to finish things.
Please attach a simple reproducer of what’s not working for you.
Thanks!
If you take a look at the code of the Quarkus JUnit extension, you’ll see no place where we log information and for good reason 😉.
As for the javadoc, I agree, it would be nice to have, so if you want to do it, it will be a nice addition