Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-M5
-
None
-
None
-
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/moldowan/.sdkman/candidates/maven/current
Java version: 11.0.9, vendor: AdoptOpenJDK, runtime: /home/moldowan/.sdkman/candidates/java/11.0.9.j9-adpt
Default locale: c.u_US, platform encoding: UTF-8
OS name: "linux", version: "4.19.128-microsoft-standard", arch: "amd64", family: "unix"Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /home/moldowan/.sdkman/candidates/maven/current Java version: 11.0.9, vendor: AdoptOpenJDK, runtime: /home/moldowan/.sdkman/candidates/java/11.0.9.j9-adpt Default locale: c.u_US, platform encoding: UTF-8 OS name: "linux", version: "4.19.128-microsoft-standard", arch: "amd64", family: "unix"
Description
With 3.0.0-M5, an exception from a shutdown hook is not printed to the console.
This works as expected with 3.0.0-M4.
To reproduce, run the project from the attached zipfile:
mvn test
[INFO] Running org.apache.maven.surefire.HookOutputTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.029 s - in org.apache.maven.surefire.HookOutputTest [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
Sometimes you at least see:
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.033 s - in org.apache.maven.surefire.HookOutputTest Exception in thread "Thread-1" [INFO] [INFO] Results:
So it looks like a timing issue?
In comparison:
mvn test -Dsurefire.version=3.0.0-M4
[INFO] Running org.apache.maven.surefire.HookOutputTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 s - in org.apache.maven.surefire.HookOutputTest Exception in thread "Thread-3" java.lang.IllegalStateException: test at org.apache.maven.surefire.HookOutputTest.lambda$testHookOutput$0(HookOutputTest.java:10) at org.apache.maven.surefire.HookOutputTest$$Lambda$314/000000000000000000.run(Unknown Source) at java.base/java.lang.Thread.run(Thread.java:836) [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
PS: I originally ran into this here: https://github.com/quarkusio/quarkus/pull/14311#pullrequestreview-569179938
Attachments
Attachments
Issue Links
- is duplicated by
-
SUREFIRE-1877 Can't print from a shutdown hook
- Closed