Falko Modler created SUREFIRE-1879:
--------------------------------------
Summary: M5 swallows exception output from shutdown hooks
Key: SUREFIRE-1879
URL: https://issues.apache.org/jira/browse/SUREFIRE-1879
Project: Maven Surefire
Issue Type: Bug
Affects Versions: 3.0.0-M5
Environment: 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"
Reporter: Falko Modler
Attachments: surefire-bug-hook-output.zip
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:
{noformat}
mvn test
{noformat}
{noformat}
[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
{noformat}
{noformat}
mvn test -Dsurefire.version=3.0.0-M4
{noformat}
{noformat}
[INFO] Running org.apache.maven.surefire.AppTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 s
- in org.apache.maven.surefire.AppTest
Exception in thread "Thread-3" java.lang.IllegalStateException: test
at
org.apache.maven.surefire.AppTest.lambda$testHookOutput$0(AppTest.java:42)
at
org.apache.maven.surefire.AppTest$$Lambda$29/000000000000000000.run(Unknown
Source)
at java.base/java.lang.Thread.run(Thread.java:836)
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
{noformat}
PS: I originally ran into this here:
https://github.com/quarkusio/quarkus/pull/14311#pullrequestreview-569179938
--
This message was sent by Atlassian Jira
(v8.3.4#803005)