You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason Dillon (JIRA)" <ji...@codehaus.org> on 2007/04/02 02:58:19 UTC

[jira] Created: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
---------------------------------------------------------------------------------------------------------------------

                 Key: SUREFIRE-315
                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
             Project: Maven Surefire
          Issue Type: Bug
    Affects Versions: 2.3
            Reporter: Jason Dillon
            Priority: Critical


The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.

Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Updated: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Gier updated SUREFIRE-315:
-------------------------------

    Attachment: SUREFIRE-349.patch

Another patch for this issue.  This patch fixes the issue, and only changes a few lines of the code.

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff, SUREFIRE-349.patch
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Closed: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed SUREFIRE-315.
---------------------------------

         Assignee: Brett Porter
       Resolution: Duplicate
    Fix Version/s:     (was: 2.4)

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Assignee: Brett Porter
>            Priority: Critical
>         Attachments: SUREFIRE-315.diff, SUREFIRE-349.patch
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Commented: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Jason Dillon (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_97034 ] 

Jason Dillon commented on SUREFIRE-315:
---------------------------------------

I though this fell through the cracks... :-)

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Commented: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Jason Dillon (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_104384 ] 

Jason Dillon commented on SUREFIRE-315:
---------------------------------------

Is this gonna make it into surefire one day?  I eventually need this applied if I ever get the chance to Mavenize the Groovy build... since its got a bunch of tests that spit out junk from static blocks and end up throwing off the current output processing for testcase execution.

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Updated: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Jason Dillon (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Dillon updated SUREFIRE-315:
----------------------------------

    Attachment: SUREFIRE-315.diff

Attached patch replaces ForkingStreamConsumer with a ForkingStreamConsumerPair, which has a nested MuxedStreamConsumer and getOut(), getErr() accessors to allow SurefireBooter to get references to the consumers.

Includes ForkingStreamConsumerPairTest (which is a shallow update to ForkingStreamConsumerTest) to verify that it works, though does not cover both streams.

Removes these files:

 * surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerTest.java
 * surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumer.java
 * surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkingWriterStreamConsumer.java

Adds these files:

 *  surefire-booter/src/main/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerPair.java
 * surefire-booter/src/test/java/org/apache/maven/surefire/booter/output/ForkingStreamConsumerPairTest.java

When writing output to -output.txt, bits from STDOUT are prefixed with [OUT] and bits from STDERR are prefixed with [ERR].  Output is synchronized to make sure that messages are put into the output file in order.

And when no test is started it spits out to the plugin's STDOUT "UNEXPECTED: " + line, which is not ideal, but functions well enough for now.


> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Updated: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-315:
----------------------------------

    Patch Submitted: [Yes]

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Updated: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-315:
----------------------------------

     Fix Version/s: 2.3.1
    Patch attached: Yes

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.3.1
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Commented: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_105795 ] 

Carlos Sanchez commented on SUREFIRE-315:
-----------------------------------------

We have to keep backwards compatibility, classes must be deprecated instead of deleted.
That said ForkingStreamConsumerPairTest should extend ForkingStreamConsumerTest to avoid repeating the code

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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

        

[jira] Updated: (SUREFIRE-315) The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SUREFIRE-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated SUREFIRE-315:
----------------------------------

    Fix Version/s:     (was: 2.3.1)
                   2.4

want a little more time to review this patch

> The redirectTestOutputToFile does not handle output before tests, nor does it handle capturing output on both streams
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-315
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-315
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.3
>            Reporter: Jason Dillon
>            Priority: Critical
>             Fix For: 2.4
>
>         Attachments: SUREFIRE-315.diff
>
>
> The redirectTestOutputToFile feature does not handle cases when output is soaked up before the tests actually run, like output from static blocks or from test case constructors.  If output is detected before the testSetStarting is invoked, then all further output will be due to a thrown ISE, which gets eatten up somewhere in surefire.
> Additionally, when a test outputs to STDOUT and STDERR, the output is not muxed properly into the -output.txt file. 

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