Having trouble believing what I'm seeing, especially given the excellent
documentation at
http://maven.apache.org/surefire/maven-surefire-plugin/examples/fork-options-and-parallel-execution.html,
but it seems to me that specifying <forkCount>2</forkCount> and
<reuseForks>false</reuseForks> using SureFire 2.16 simply doesn't do
anything (it seems to behave as though I had specified nothing).

The debug output shows that the default value for forkMode (which I haven't
specified, per the documentation) is (as you would expect) 1, and the
behavior from my tests seems to indicate that this is trumping (i.e.
there's only one VM forked).

Furthermore, including something like this:

<systemPropertyVariables>
  <foobar>${surefire.forkNumber}</foobar>
</systemPropertyVariables>

...yields null in my tests for:

System.getProperty("foobar");

...but if I change it to

<systemPropertyVariables>
  <foobar>bizbaw</foobar>
</systemPropertyVariables>

...then System.getProperty("foobar") yields "bizbaw" as I'd expect.

The net behavior makes me think that I'm missing something fundamental, or
that the documentation has instructed me to do something that doesn't work.

My JUnit dependency is 4.11 if it matters.

Best,
Laird

-- 
http://about.me/lairdnelson

Reply via email to