Chris Ng created SUREFIRE-822:
---------------------------------

             Summary: 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.11, 2.8
         Environment: linux/windows/maven 2.2.1
            Reporter: Chris Ng
         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