[ https://issues.apache.org/jira/browse/SUREFIRE-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17541397#comment-17541397 ]
Aliaksei Khizhniak edited comment on SUREFIRE-1983 at 5/24/22 10:03 AM: ------------------------------------------------------------------------ I have started getting this issue on 3.0.0-M6. Never had it before on 3.0.0-M5. I am using Junit 5.8.2 and logback 1.2.11 if that matters My tests are parallelised by class in threads, surefire uses default configuration (1 fork for all tests) was (Author: JIRAUSER289932): I have started getting this issue on 3.0.0-M6. Never had it before on 3.0.0-M5. I am using Junit 5.8.2 and logback 1.2.11 if that matters My tests are parallelised by class in threads, surefire uses default configuration (1 fork for all tests) > Corrupted STDOUT by directly writing to native stream in forked JVM 1. > [setupJunitLogger() should be called AFTER startCapture()] > --------------------------------------------------------------------------------------------------------------------------------- > > Key: SUREFIRE-1983 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1983 > Project: Maven Surefire > Issue Type: Bug > Components: JUnit 5.x support, Maven Failsafe Plugin, Maven Surefire > Plugin > Reporter: Tibor Digana > Assignee: Tibor Digana > Priority: Major > Fix For: 2.22.3, 3.0.0-M6 > > > The warning messages "Corrupted STDOUT by directly writing to native stream > in forked JVM 1." appear in Surefire JUnit5 provider. In order to reproduce > this issue with old versions, Log4j or slf4j logger should be used. The > previous fixes were not reliable. The real root cause of this issue is based > on incorrect order of methods startCapture() and setupJunitLogger(). > setupJunitLogger() should be called AFTER startCapture() -- This message was sent by Atlassian Jira (v8.20.7#820007)