You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Hinterseher (JIRA)" <ji...@codehaus.org> on 2010/08/19 11:31:33 UTC

[jira] Issue Comment Edited: (SUREFIRE-639) Error inside systemOut parser: java.lang.IllegalStateException: testSetStarting called twice

    [ http://jira.codehaus.org/browse/SUREFIRE-639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232451#action_232451 ] 

Michael Hinterseher edited comment on SUREFIRE-639 at 8/19/10 4:30 AM:
-----------------------------------------------------------------------

I found the problem.
In case the last System.out doesn't force a line break the test results get appended on the end of the previous System.out.
This causes an error during reading the results but only in case of redirect to file is on
To reproduce just change in Test2 "println" to "print" like following:
    @AfterClass
    public static void testWithFailingAssumption3() {
        System.out.print( "After628Test2 on" + Thread.currentThread().getName());
    }

      was (Author: mhinterseher):
    I found the problem.
In case the last System.out doesn't force a line break the test results get appended on the end of the previous System.out.
This causes an error during reading the results but only in case of redirect to file is on
To reproduce just change in Test2 "println" to "print" like following:
    @AfterClass
    public static void testWithFailingAssumption3() {
        System.out.print( "After628Test2 on" + Thread.currentThread().getName());
    }

Fix: Change the output of the 
  
> Error inside systemOut parser: java.lang.IllegalStateException: testSetStarting called twice
> --------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-639
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-639
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.6
>         Environment: Windows 7
> java version "1.6.0_19"
> Java(TM) SE Runtime Environment (build 1.6.0_19-b04)
> Java HotSpot(TM) 64-Bit Server VM (build 16.2-b04, mixed mode)
> Maven 2.2.1
>            Reporter: Michael Hinterseher
>            Assignee: Kristian Rosenvold
>
> After upgrading surefire/surefire report from 2.5 to 2.6 it fails after test are run with
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException: Error
> inside systemOut parser
> testSetStarting called twice
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.code
> haus.plexus.util.cli.CommandLineException: Error inside systemOut parser
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error while executing forked tests.; nested exception is org.apache.maven.surefire.booter.shade.org.c
> odehaus.plexus.util.cli.CommandLineException: Error inside systemOut parser
>         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:579)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         ... 17 more
> Caused by: org.apache.maven.surefire.booter.SurefireBooterForkException: Error while executing forked tests.; nested exception is org.apache.maven.surefire.boot
> er.shade.org.codehaus.plexus.util.cli.CommandLineException: Error inside systemOut parser
>         at org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java:685)
>         at org.apache.maven.surefire.booter.SurefireBooter.forkSuites(SurefireBooter.java:485)
>         at org.apache.maven.surefire.booter.SurefireBooter.runSuitesForkOnce(SurefireBooter.java:385)
>         at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:246)
>         at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:575)
>         ... 19 more
> Caused by: org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineException: Error inside systemOut parser
>         at org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:222)
>         at org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:114)
>         at org.apache.maven.surefire.booter.SurefireBooter.fork(SurefireBooter.java:681)
>         ... 23 more
> Caused by: java.lang.IllegalStateException: testSetStarting called twice
>         at org.apache.maven.surefire.booter.output.FileOutputConsumerProxy.testSetStarting(FileOutputConsumerProxy.java:112)
>         at org.apache.maven.surefire.booter.output.ForkingStreamConsumer.consumeLine(ForkingStreamConsumer.java:60)
>         at org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.java:197)
>         at org.apache.maven.surefire.booter.shade.org.codehaus.plexus.util.cli.StreamPumper.run(StreamPumper.java:137)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira