[jira] [Updated] (SUREFIRE-1662) Invalid content of .surefire-XXXXXXXXX statistic file when parameters contain new line

2019-04-26 Thread Ondrej Lukas (JIRA)


 [ 
https://issues.apache.org/jira/browse/SUREFIRE-1662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ondrej Lukas updated SUREFIRE-1662:
---
Description: 
In case when _@Parameters_ contains any new line ("_\n_") then created 
_.surefire-X_ statistic file is invalid because new line is not escaped 
in that file.

It causes that tests can be run only once. Exception like this is thrown during 
second run:
{code}
Execution default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test failed: 
java.lang.NumberFormatException: For input string: 
"NewLine](com.example.SomeTest)"
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution 
default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test failed: 
java.lang.NumberFormatException: For input string: 
"NewLine](com.example.SomeTest)"
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
Caused by: org.apache.maven.surefire.util.SurefireReflectionException: 
java.lang.NumberFormatException: For input string: 
"NewLine](com.example.SomeTest)"
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray 
(ReflectionUtils.java:177)
at org.apache.maven.surefire.util.ReflectionUtils.invokeGetter 

[jira] [Created] (SUREFIRE-1662) Invalid content of .surefire-XXXXXXXXX statistic file when parameters contain new line

2019-04-26 Thread Ondrej Lukas (JIRA)
Ondrej Lukas created SUREFIRE-1662:
--

 Summary: Invalid content of .surefire-X statistic file 
when parameters contain new line
 Key: SUREFIRE-1662
 URL: https://issues.apache.org/jira/browse/SUREFIRE-1662
 Project: Maven Surefire
  Issue Type: Bug
  Components: Maven Surefire Plugin
Affects Versions: 3.0.0-M3
Reporter: Ondrej Lukas


In case when _@Parameters_ contains any new line ("_\n_") then created 
_.surefire-X_ statistic file is invalid because new line is not escaped 
in that file.

*How to reproduce:*
Use following `@Parameters` in some test:
{code:java}
@Parameters(name = "mode={0}")
public static Collection parameters() {
return asList("somethingWith\nNewLine", "something");
}
{code}
It will result to file where two lines are printed instead of one:
{code}
1,0,testSomething[mode=somethingWith
NewLine](com.example.SomeTest)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SUREFIRE-1479) SurefireBooterForkException: The forked VM terminated without properly saying goodbye since 2.20.1

2018-02-20 Thread Ondrej Lukas (JIRA)
Ondrej Lukas created SUREFIRE-1479:
--

 Summary: SurefireBooterForkException: The forked VM terminated 
without properly saying goodbye since 2.20.1
 Key: SUREFIRE-1479
 URL: https://issues.apache.org/jira/browse/SUREFIRE-1479
 Project: Maven Surefire
  Issue Type: Bug
  Components: Maven Surefire Plugin
Affects Versions: 2.20.1
Reporter: Ondrej Lukas


After upgrade to maven surefire plugin to version 2.20.1 (from version 2.20) 
our testsuite start to fail on HP-UX with:
 
 
{code:java}
Process Exit Code: 1     at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:496)
     at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkPerTestSet(ForkStarter.java:443)
     at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:295)
     at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:246)
     at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1124)
     at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:954)
     at 
org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:832)
     at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
     at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) 
    at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) 
    at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
     at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
     at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
     at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)  
   at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)     at 
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)     at 
org.apache.maven.cli.MavenCli.execute(MavenCli.java:955)     at 
org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)     at 
org.apache.maven.cli.MavenCli.main(MavenCli.java:194)     at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)   
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)     at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
     at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
    at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
     at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: The 
forked VM terminated without properly saying goodbye. VM crash or System.exit 
called?{code}
 
 
This exception is thrown and no test cases are run.
 
I believe that this issue in not dependent on HP-UX since I found the same 
issue for windows [1], but it seems it has not been reported yet.
 
Since the only change between correct test execution and thrown exception is 
just change of surefire version I believe this is regression.
 
[1] 
[https://stackoverflow.com/questions/48631856/maven-surefire-forked-vm-terminated-issue-in-windows]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)