[ 
http://jira.codehaus.org/browse/SUREFIRE-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=248787#action_248787
 ] 

Kristian Rosenvold edited comment on SUREFIRE-599 at 12/16/10 12:07 PM:
------------------------------------------------------------------------

This issue is a combination of two bugs, both of which were fixed for 2.7:

There was a minor problem in surefire2.6, where it started loading classes 
before capturing stdout/stderr. This would allow third party loggers to get 
hold of the uncaptured stdout/stderr. This has been fixed for 2.7.

The TeeStream memory leak explains the per-test increase in logging. This is an 
old bug that was also fixed for 2.7.

      was (Author: krosenvold):
    I am closing this issue because the symptoms described are *exactly* those 
of the TeeStream memory leak, which has been fixed in 2.7. Feel free to reopen 
if 2.7 does not fix the issue.
  
> Logs console output multiple times (no. of times log output = the no. of test 
> being run) for JUnit/XMLUnit tests
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-599
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-599
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 3.x support
>    Affects Versions: 2.5
>         Environment: Ubuntu 9.04
> Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
> Java version: 1.6.0_16
> OS name: "linux" version: "2.6.31-17-generic" arch: "i386" Family: "unix"
> JUnit 3.8.2
> Log4j 1.2.14
>            Reporter: Mahender Didwania
>            Assignee: Kristian Rosenvold
>             Fix For: 2.7
>
>
> I have a test class (named ATest) written by extending the JUnit TestCase 
> class.  This class has a few test methods which all call the same method on a 
> class (named A) with different parameters, exactly once each.
> Now the class A which is being tested logs to console using Apache log4j's 
> ConsoleAppender, at INFO level.
> In the first test method, a message is logged once (which is how it should 
> be).
> In the second test method, every log message is repeated once (so gets logged 
> twice instead of once).
> In the third test method, every log message is logged thrice.
> ...
> and so on.  Please note that the method in class A is invoked only once by 
> the written source-code in each of the test methods and logs only once.

-- 
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

        

Reply via email to