You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "foo bar (JIRA)" <ji...@apache.org> on 2018/07/22 20:20:00 UTC
[jira] [Updated] (SUREFIRE-1539) Surefire causes Jigwaw runtime
errors when forkCount > 0
[ https://issues.apache.org/jira/browse/SUREFIRE-1539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
foo bar updated SUREFIRE-1539:
------------------------------
Description:
h1. The problem
I'm migrating my toy project to Jigsaw modules.
Now I managed to make it work ({{maven clean install}} OK), but I had to pass an additional flag to Surefire ({{forkCount=0}}) that I think I shouldn't have to and feels very "magical" (in a bad way).
To reproduce:
1. {{git clone [https://github.com/vandekeiser/wires.git]}}
2. {{git checkout REPORT_SUREFIRE}}
3.1 {{mvn clean install}}
-->passes
3.2 remove {{<forkCount>0</forkCount>}} in {{/pom.xml}}
-->fails
h1. Analysis
If I remove {{<forkCount>0</forkCount>}} in {{/pom.xml}} I get:
{code:java}
[ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 5.678 s <<< FAILURE! - in fr.cla.wires.core.boxes.exampleusage.propertybasedtesting.MultipleAnd_ReduceAndCollectShouldBeEquivalent_PbtTest
[ERROR] should_sometimes_give_false(fr.cla.wires.core.boxes.exampleusage.propertybasedtesting.MultipleAnd_ReduceAndCollectShouldBeEquivalent_PbtTest) Time elapsed: 0.219 s <<< ERROR!
com.pholser.junit.quickcheck.internal.ReflectionException: java.lang.IllegalAccessException: class com.pholser.junit.quickcheck.internal.Reflection cannot access class fr.cla.wires.core.support.tests.pbt.BooleansGenerator (in module fr.cla.wires.core) because module fr.cla.wires.core does not export fr.cla.wires.core.support.tests.pbt to unnamed module @4b5a5ed1
{code}
-->It looks like {{argLine}} options are appended incorrectly to the final command line when {{forkCount > 0}} ?
From what I saw, Surefire calls Java with an {{@argFile}} argument pointing to a tmp file with all the arguments (here {{@C:\Users\User\AppData\Local\Temp\surefire17232382819109770877\surefireargs1242676904531575952}}), so the {{--add-opens}} should go into that.
But it seems it only does when {{forkCount ==0}} ??
was:
h1. The problem
I'm migrating my toy project to Jigsaw modules.
Now I managed to make it work ({{maven clean install}} OK), but I had to pass an additional flag to Surefire ({{forkCount=0}}) that I think I shouldn't have to and feels very "magical" (in a bad way).
To reproduce:
1. {{git clone [https://github.com/vandekeiser/wires.git]}}
2. {{git checkout REPORT_SUREFIRE}}
3.1 {{mvn clean install}}
-->passes
3.2 remove {{<forkCount>0</forkCount>}} in {{/pom.xml}}
-->fails
h1. Analysis
If I remove {{<forkCount>0</forkCount>}} in {{/pom.xml}} I get:
{code:java}
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was cmd.exe /X /C ""C:\Program Files\Java\jdk-10.0.2\bin\java" --add-opens fr.cla.wires.core.support.tests.pbt=ALL-UNNAMED @C:\Users\User\AppData\Local\Temp\surefire17232382819109770877\surefireargs1242676904531575952 C:\Users\User\AppData\Local\Temp\surefire17232382819109770877 2018-07-22T17-31-27_183-jvmRun1 surefire6300613916016740531tmp surefire_0406188086577321752tmp"
{code}
-->It looks like {{argLine}} options are appended incorrectly to the final command line when {{forkCount > 0}} ?
From what I saw, Surefire calls Java with an {{@argFile}} argument pointing to a tmp file with all the arguments (here {{@C:\Users\User\AppData\Local\Temp\surefire17232382819109770877\surefireargs1242676904531575952}}), so the {{--add-opens}} should go into that.
But it seems it only does when {{forkCount ==0}} ??
> Surefire causes Jigwaw runtime errors when forkCount > 0
> --------------------------------------------------------
>
> Key: SUREFIRE-1539
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1539
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.22.0
> Reporter: foo bar
> Priority: Major
>
> h1. The problem
> I'm migrating my toy project to Jigsaw modules.
> Now I managed to make it work ({{maven clean install}} OK), but I had to pass an additional flag to Surefire ({{forkCount=0}}) that I think I shouldn't have to and feels very "magical" (in a bad way).
> To reproduce:
> 1. {{git clone [https://github.com/vandekeiser/wires.git]}}
> 2. {{git checkout REPORT_SUREFIRE}}
> 3.1 {{mvn clean install}}
> -->passes
> 3.2 remove {{<forkCount>0</forkCount>}} in {{/pom.xml}}
> -->fails
> h1. Analysis
> If I remove {{<forkCount>0</forkCount>}} in {{/pom.xml}} I get:
> {code:java}
> [ERROR] Tests run: 5, Failures: 0, Errors: 5, Skipped: 0, Time elapsed: 5.678 s <<< FAILURE! - in fr.cla.wires.core.boxes.exampleusage.propertybasedtesting.MultipleAnd_ReduceAndCollectShouldBeEquivalent_PbtTest
> [ERROR] should_sometimes_give_false(fr.cla.wires.core.boxes.exampleusage.propertybasedtesting.MultipleAnd_ReduceAndCollectShouldBeEquivalent_PbtTest) Time elapsed: 0.219 s <<< ERROR!
> com.pholser.junit.quickcheck.internal.ReflectionException: java.lang.IllegalAccessException: class com.pholser.junit.quickcheck.internal.Reflection cannot access class fr.cla.wires.core.support.tests.pbt.BooleansGenerator (in module fr.cla.wires.core) because module fr.cla.wires.core does not export fr.cla.wires.core.support.tests.pbt to unnamed module @4b5a5ed1
> {code}
> -->It looks like {{argLine}} options are appended incorrectly to the final command line when {{forkCount > 0}} ?
> From what I saw, Surefire calls Java with an {{@argFile}} argument pointing to a tmp file with all the arguments (here {{@C:\Users\User\AppData\Local\Temp\surefire17232382819109770877\surefireargs1242676904531575952}}), so the {{--add-opens}} should go into that.
> But it seems it only does when {{forkCount ==0}} ??
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)