You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Richard Raumberger (JIRA)" <ji...@apache.org> on 2016/11/07 22:55:58 UTC
[jira] [Created] (SUREFIRE-1301) baseDir system-property gets
overridden by other builder threads if forking is disabled
Richard Raumberger created SUREFIRE-1301:
--------------------------------------------
Summary: baseDir system-property gets overridden by other builder threads if forking is disabled
Key: SUREFIRE-1301
URL: https://issues.apache.org/jira/browse/SUREFIRE-1301
Project: Maven Surefire
Issue Type: Bug
Components: Maven Surefire Plugin
Affects Versions: 2.19.1
Reporter: Richard Raumberger
Priority: Minor
When running tests in a multi-module project with multiple builder threads and surefire's forkCount set to 0, the threads override each other when setting the baseDir system-property.
Running the [sample project|https://cloud.almost-a-blog.net/s/IHS63tBqowjhvBh/download] results in the below output with the given commands.
(Note: First number is the expected path. e.g. 11 => wrapper1; module1)
{code}
mvn clean install | grep basedir
01 basedir=<path>/maven-surefire-example/module1
02 basedir=<path>/maven-surefire-example/module2
03 basedir=<path>/maven-surefire-example/module3
11 basedir=<path>/maven-surefire-example/wrapper1/module1
12 basedir=<path>/maven-surefire-example/wrapper1/module2
13 basedir=<path>/maven-surefire-example/wrapper1/module3
21 basedir=<path>/maven-surefire-example/wrapper2/module1
22 basedir=<path>/maven-surefire-example/wrapper2/module2
23 basedir=<path>/maven-surefire-example/wrapper2/module3
31 basedir=<path>/maven-surefire-example/wrapper3/module1
32 basedir=<path>/maven-surefire-example/wrapper3/module2
33 basedir=<path>/maven-surefire-example/wrapper3/module3
{code}
{code}
mvn clean install -T 3 | grep basedir
02 basedir=<path>/maven-surefire-example/module2
01 basedir=<path>/maven-surefire-example/module2
03 basedir=<path>/maven-surefire-example/module2
13 basedir=<path>/maven-surefire-example/wrapper1/module1
23 basedir=<path>/maven-surefire-example/wrapper1/module1
11 basedir=<path>/maven-surefire-example/wrapper1/module1
12 basedir=<path>/maven-surefire-example/wrapper2/module2
21 basedir=<path>/maven-surefire-example/wrapper2/module2
22 basedir=<path>/maven-surefire-example/wrapper2/module2
32 basedir=<path>/maven-surefire-example/wrapper3/module3
31 basedir=<path>/maven-surefire-example/wrapper3/module3
33 basedir=<path>/maven-surefire-example/wrapper3/module3
{code}
This is correct behaviour from a technical point of view as the system-properties are shared between the threads and the surefire-executions (due to the disabled forking), therefore I opened this issue mainly for documentation purpose.
This behaviour does not affect our current project anymore due to the removal of the forkCount setting, yet I think that this behaviour should be documented.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)