[ https://issues.apache.org/jira/browse/SUREFIRE-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17280739#comment-17280739 ]
Alexander Kriegisch commented on SUREFIRE-1881: ----------------------------------------------- Sorry, yet another new finding: I was talking about the log output produced by the Java agent when run by Maven. The phenomenon you described {code:none} [TraInNsFfOor]m er BEURIRL]D cSlUaCsCsENSaSme - [jIaNvFaO/u]t il-/-c-o-n-c-u-r-r-e-n-t-/-E-x-e-c-u-t-o-r-s-$-R-u-n-n-a-b-l-e-A-d-a-p-t-e-r-,- -c-l-a-s-s- -f-i-l-e- -s-i-z-e- -=- -1-4-3-2- --------- {code} related to the broken test summary I never saw on the console inside IntelliJ IDEA or in Git Bash, but now on the regular Windows console (cmd.exe) which I hardly ever use for builds, but tested just now. It only occurs there and only on a 3.0 milestone, not in 2.22.2. In Git Bash or IDEA, I only see the problem reported here, garbled agent output on _stdOut_ vs _stdErr_. So it seems we now have 3 distinct issues here already. The most pressing one is certainly the hanging build when using {{SurefireForkNodeFactory}}, but the others should also be addressed. > Java agent printing to native console makes build block when using > SurefireForkNodeFactory > ------------------------------------------------------------------------------------------ > > Key: SUREFIRE-1881 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1881 > Project: Maven Surefire > Issue Type: Bug > Components: Maven Failsafe Plugin, Maven Surefire Plugin > Affects Versions: 3.0.0-M5 > Reporter: Alexander Kriegisch > Priority: Major > Attachments: maven-failsafe-debug-log.txt > > > This is a follow-up to SUREFIRE-1788 which was closed prematurely even though > there still were open issues which were discussed there initially. Basically > the situation is as follows: > * I use Java agents writing to stdOut and stdErr in my tests. > * I was annoyed that Surefire/Failsafe were writing lots of {{[WARNING] > Corrupted STDOUT by directly writing to native stream in forked JVM}} lines > into {{*-jvmRun1.dumpstream}} files. [~tibordigana] then told me to use > {{<forkNode > implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/>}} > in my POM in order to fix the issue. > * I tried this in version 3.0.0-M5, but unfortunately, it makes > Surefire/Failsafe freeze if a Java agent prints something to stdOut or > stdErr. This happens both in M5 and in M6-SNAPSHOT after both SUREFIRE-1788 > and SUREFIRE-1809 have been merged in already. > * My [sample > project|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems] > reproduces the issue as soon as you uncomment the option in the POM and run > {{mvn clean verify}}. > * The second issue is: *Not* using this option leads to garbled log output > when a Java agent writes to both stdOut and stdErr before/during tests. See > comments in class > [{{Agent.DummyTransformer}}|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems/blob/master/src/main/java/de/scrum_master/dummy/Agent.java] > for examples for garbled log lines and also comments in > [pom.xml|https://github.com/kriegaex/Maven_Surefire_PrintToConsoleProblems/blob/master/pom.xml#L36] > for further information. > * If the garbled output would also appear with this option activated, cannot > be tested at present due to the Surefire/Failsafe freeze. I will re-test that > after the freeze has been fixed and before this issue can be closed. -- This message was sent by Atlassian Jira (v8.3.4#803005)