maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Rosenvold (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (SUREFIRE-665) Output to file stops after a while
Date Wed, 15 Dec 2010 20:36:59 GMT

     [ http://jira.codehaus.org/browse/SUREFIRE-665?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kristian Rosenvold closed SUREFIRE-665.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.1
         Assignee: Kristian Rosenvold

Fixed in r1049669. It's the redirectOutputToFile that is buggy and can have race conditions.

> Output to file stops after a while
> ----------------------------------
>
>                 Key: SUREFIRE-665
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-665
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.6
>            Reporter: Tom Baeyens
>            Assignee: Kristian Rosenvold
>             Fix For: 2.7.1
>
>
> After some tests of proper behavior, surefire stops logging the console output (stderr
& stdout) to the files.  For the first tests that are executed, the Xxxxx-output.txt files
contain the correct console output.  But from some test in the test suite, all those files
are blank.  
> My environment: Mac with 
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
> Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
> Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
> Java version: 1.6.0_20
> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"
> Using Surefire 2.6
> I've done following observations:
> * The exact test where the console capturing stops can vary a couple of tests, but it
always happens.  Could it be related to memory?  Increasing from MAVEN_OPTS="-Xmx1024m -Xms512m"
to MAVEN_OPTS="-Xmx2048m -Xms512m" didn't have an effect
> * When debugging, as long as the output is ok, System.err.checkError() returns false.
 Once the output files get blank, System.err.checkError() returns true.
> * The problem doesn't occur when running the same test suite in eclipse.
> * When I didn't specify surefire version, I got 2.4.something.  When I explicitely set
the version to 2.6, then the test suite started failing half way with out of memory exceptions.
 
> * Then I configured <forkMode>always</forkMode>.  That made the whole test
suite run fine (no memory exceptions and all log files being produced) but then it takes a
very long time.
> * I traced closing of the system err stream until SystemStreamCapturer
> 76     public void restoreStreams()
> 77     {
> 78         // Note that the fields can be null if the test hasn't even started yet (an
early error)
> 79         if ( oldOut != null )
> 80         {
> 81             System.setOut( oldOut );
> 82         }
> 83         if ( oldErr != null )
> 84         {
> 85             System.setErr( oldErr );
> 86         }
> 87 
> 88         IOUtil.close( newOut );
> 89         IOUtil.close( newErr );
> 90     }
> But there I couldn't find how to trace it further and gave up.
> To reproduce: (only tested on mac)
> check out https://svn.codehaus.org/activiti/activiti/trunk and then on the root do
> mvn clean install
> only the first executed tests will contain properly captured output in modules/activiti-engine/target/surefire-reports/*-output.txt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message