You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2022/04/01 14:43:00 UTC

[jira] [Updated] (SUREFIRE-1879) M5 swallows exception output from shutdown hooks

     [ https://issues.apache.org/jira/browse/SUREFIRE-1879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tibor Digana updated SUREFIRE-1879:
-----------------------------------
    Fix Version/s: waiting-for-feedback

> 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
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>         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}
> Sometimes you at least see:
> {noformat}
> [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:
> {noformat}
> So it looks like a timing issue?
> In comparison:
> {noformat}
> mvn test -Dsurefire.version=3.0.0-M4
> {noformat}
> {noformat}
> [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
> {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.20.1#820001)