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

Kristian Rosenvold closed SUREFIRE-822.
---------------------------------------

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

Good catch and a nice patch. I added some test coverage and extended the fix 
all the way into the xml reports for the method name.

Fixed in r1237087, thanks for the patch!
                
> JUnit4RunListener doesn't handle apparently 'legal' junit descriptions
> ----------------------------------------------------------------------
>
>                 Key: SUREFIRE-822
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-822
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Junit 4.x support
>    Affects Versions: 2.8, 2.11
>         Environment: linux/windows/maven 2.2.1
>            Reporter: Chris Ng
>            Assignee: Kristian Rosenvold
>             Fix For: 2.12
>
>         Attachments: parensRegex.patch, surefire-testcase.zip
>
>
> from trawling around in the junit code, it appears that a 'legal' displayName 
> for a test org.junit.runner.Description takes the format:
> {{<anyText>(className)}}
> This is created by the method {{Description.createTestDescription(Class<?> 
> clazz, String name, Annotation... annotations)}}.
> JunitParams creates names in the format:
> {{<parameterText> (<methodName>)(className)}}
> and the PARENS regex in JUnit4RunListener doesn't parse this correctly, so 
> fails to find the className.  If surefire is run in parallel mode this bombs 
> the ConcurrentReporterManager with an NPE.  This stops all subsequent tests 
> from being reported correctly.
> There are some changes in [SUREFIRE-800] which may stop the NPE from 
> ConcurrentReporterManager, but I've attached a patch to make the PARENS regex 
> just search for the contents of the last pair of braces.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to