You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "anshul (JIRA)" <ji...@codehaus.org> on 2008/07/22 19:14:26 UTC

[jira] Created: (SUREFIRE-506) Maven runs suite() methods of all junit 3.x tests for each unit test even when forkMode is set to always

Maven runs suite() methods of all junit 3.x tests for each unit test even when forkMode is set to always
--------------------------------------------------------------------------------------------------------

                 Key: SUREFIRE-506
                 URL: http://jira.codehaus.org/browse/SUREFIRE-506
             Project: Maven Surefire
          Issue Type: Bug
          Components: JUnit 3.x support
    Affects Versions: 2.4.2
         Environment: Windows XP, Java 1.6
Doesn't seem like an environment specific issue
            Reporter: anshul
            Priority: Minor


When running unit tests, if a project has junit 3 unit tests, and the pom has forkMode set to always, like so
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.4.2</version>
          <configuration>
            <disableXmlReport>true</disableXmlReport>
			<forkMode>always</forkMode>
          </configuration>
        </plugin>

the unit test runner invokes the suite() method of all the junit 3 unit tests, even though they will not be run within the specific fork of thats running just one unit tests. This can be confusing and may cause issues if the unit tests were doing some @BeforeClass style initializations in the suite() method. Moreover this may be inefficient. 

-- 
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-506) Maven runs suite() methods of all junit 3.x tests for each unit test even when forkMode is set to always

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

Kristian Rosenvold closed SUREFIRE-506.
---------------------------------------

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

This should at least be fixed for 2.7. Possibly even earlier versions.

> Maven runs suite() methods of all junit 3.x tests for each unit test even when forkMode is set to always
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-506
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-506
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 3.x support
>    Affects Versions: 2.4.2
>         Environment: Windows XP, Java 1.6
> Doesn't seem like an environment specific issue
>            Reporter: anshul
>            Assignee: Kristian Rosenvold
>            Priority: Minor
>             Fix For: 2.7
>
>
> When running unit tests, if a project has junit 3 unit tests, and the pom has forkMode set to always, like so
>         <plugin>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <version>2.4.2</version>
>           <configuration>
>             <disableXmlReport>true</disableXmlReport>
> 			<forkMode>always</forkMode>
>           </configuration>
>         </plugin>
> the unit test runner invokes the suite() method of all the junit 3 unit tests, even though they will not be run within the specific fork of thats running just one unit tests. This can be confusing and may cause issues if the unit tests were doing some @BeforeClass style initializations in the suite() method. Moreover this may be inefficient. 

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