maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Digana (JIRA)" <>
Subject [jira] [Commented] (SUREFIRE-1614) JUnit Runner that writes to System.out corrupts Surefire's STDOUT when using JUnit's Vintage Engine
Date Fri, 28 Dec 2018 13:47:00 GMT


Tibor Digana commented on SUREFIRE-1614:

Pls use {{3.0.0-M3}} and confirm the warning is gone on the same project and identical build
Every milestone M1 - M5 is GA for common users. Common user means that you do not develop
Providers by yourself and you use the plugins together with default providers in your POM.
See the roadmap
All versions upto M5 can be used as if it was 2.x version without any user notice of migration
to API 3.0 and bug fixes. The last milestone would become 3.0.0 and there the users should
pay higher attention because some system properties would have a prefix and test filters would
use syntax with fully-qualified-class-names instead of the old ANT style which is what user
group want and this would fix platform dependent bugs related to file system slashes. It would
be a bigger change for us implementators rather than users. Therefore the first milestones
are absolutely not invasive upto the last one which is why we intensively work on 3.0 and
that's why users are still on safe side as if it was version 2.x and no reason to be worry.

> JUnit Runner that writes to System.out corrupts Surefire's STDOUT when using JUnit's
Vintage Engine
> ---------------------------------------------------------------------------------------------------
>                 Key: SUREFIRE-1614
>                 URL:
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 5.x support
>    Affects Versions: 2.22.1, 3.0.0-M2
>            Reporter: Andy Wilkinson
>            Assignee: Christian Stein
>            Priority: Major
>             Fix For: 3.0.0-M3
>         Attachments:
> When JUnit Jupiter's Vintage Engine is used to run tests written using the JUnit 4 API,
output to the console from a {{TestRunner}} results in Surefire's STDOUT being corrupted:
> {noformat}
> [WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1. See
FAQ web page and the dump file […]{noformat}
> Note that the test runner is simply calling {{System.out}}. This is to simulate the
real world setup where the runner performs some logging that ultimately results in a console
appender calling {{System.out}}. The same arrangement does not cause a problem when run using
JUnit 4. An initial investigation suggests that the Vintage Engine calls the custom {{TestRunner}}
earlier and, it would appear, at a time when Surefire cannot tolerate output to {{System.out}}.
> I have attached a minimal project that reproduces the problem. Running {{./mvnw -Pjunit5
test}} will reproduce the corruption. Running {{./mvnw -Pjunit4 test}} will not.

This message was sent by Atlassian JIRA

View raw message