You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ronald Chen (JIRA)" <ji...@codehaus.org> on 2014/01/29 00:25:57 UTC

[jira] (SUREFIRE-1056) fractional forkCount does not work as intended on single core machines

Ronald Chen created SUREFIRE-1056:
-------------------------------------

             Summary: fractional forkCount does not work as intended on single core machines
                 Key: SUREFIRE-1056
                 URL: https://jira.codehaus.org/browse/SUREFIRE-1056
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Failsafe Plugin, Maven Surefire Plugin
    Affects Versions: 2.16
         Environment: single core machines (repo with virtual machine)
            Reporter: Ronald Chen


We set forkCount=0.5C which works well for dual and quad core machines.  We want to set something less than 1C since we want our development machines to continue to be usable while the test are running.

The problem comes in when a single core uses the 0.5C configuration, which is equivalent to forkCount=0.

forkCount=0 and forkCount=1 means vastly different things.  forkCount=0 will run the test on the same JVM as the Maven processes, while forkCount=1 will fork 1 JVM.

In order for File.exists() to work (see java bug http://bugs.java.com/bugdatabase/view_bug.do;:YfiG?bug_id=4483097) the JVM working directory must be correctly set.

When forkCount=0 the Maven JVM working directory is used, thus test that use relative paths and File.exists() will fail.

What I expect is whenever a fractional forkCount is used, it is bounded to a minimum of 1.  forkCount=0 should only be used when configured explicitly.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)