You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2011/01/20 21:54:00 UTC

[jira] Closed: (SUREFIRE-602) Unable to run tests using a different JVM unless using forkMode="once" (always and pertest do not work)

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

Kristian Rosenvold closed SUREFIRE-602.
---------------------------------------

    Resolution: Cannot Reproduce
      Assignee: Kristian Rosenvold

I have tried verifying this issue with both surefire 2.4.3 and 2.7.1. The forking of the jvm works "as advertised" in all cases I am able to reproduce, and I am able to do so regardless of forkmode.

Please note that forkMode=once and forkMode=always may cause classes to be loaded in different order (for once), which may
cause different behaviour, which may be the real source of this issue.

Feel free to reopen this issue if any substantial additional information is available.

> Unable to run tests using a different JVM unless using forkMode="once" (always and pertest do not work)
> -------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-602
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-602
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: process forking
>    Affects Versions: 2.4.3
>         Environment: Maven version: 2.0.10
> Java version: 1.5.0_08
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
>            Reporter: Richard Chamberlain
>            Assignee: Kristian Rosenvold
>
> Hi,
> Our build farm uses java 1.5.0_08. We have written some code in java 6. We can get it to compile in java 6, but running tests wasn't that easy. We originally set the config to:
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>         <version>2.4.3</version>
>         <configuration>
>           <redirectTestOutputToFile>true</redirectTestOutputToFile>
>           <jvm>D:\buildTools\jdk\1.6.0\bin\java.exe</jvm>
>           <forkMode>pertest</forkMode>
>           <includes>
>             <include>**/*Behavior.java</include>
>           </includes>
>         </configuration>
>       </plugin>
> But this didn't work reporting a bad version in class file error. When we set forkMode to "once", it worked. 
> After further investigation
> - the jvm property is only picked up when forkMode is "once"
> - it does not work when forkmode is "pertest" or "always"
> This was extremely painful to work out what the bug was. Can I also suggest that you print out the JVM version and any parameters in the debug (mvn -X) output?
> Thanks,
> Richard

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