Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1056

fractional forkCount does not work as intended on single core machines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.16
    • 2.17
    • None
    • single core machines (repo with virtual machine)

    Description

      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.

      Attachments

        Activity

          People

            agudian Andreas Gudian
            pyrolistical Ronald Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: