[ 
https://issues.apache.org/jira/browse/SUREFIRE-1222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506423#comment-15506423
 ] 

Tibor Digana commented on SUREFIRE-1222:
----------------------------------------

Hi Martin,

Surefire together with Maven is platform for your Tests.
The Redirect class in Arquillian must be implemented in Arquillian project.
I have never seen it.
This means Arquillian should listen to InputStream of child process and
write data to parent process in OutputStream. This would not harm Surefire
then. I saw tests where users override std/out stream as well. If both call
setOut() then both work against each other.

https://github.com/apache/maven-shared/blob/trunk/maven-shared-utils/src/main/java/org/apache/maven/shared/utils/cli/CommandLineUtils.java#L233


On Tue, Sep 20, 2016 at 11:58 AM, Martin Kouba (JIRA) <j...@apache.org>



> ForkClient attempts to consume unrelated lines
> ----------------------------------------------
>
>                 Key: SUREFIRE-1222
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1222
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin, process forking
>    Affects Versions: 2.17
>         Environment: Oracle JDK7 (build 1.7.0_79-b15)
> Linux 3.13 x86_64 with default locale cs_CZ
>            Reporter: Martin Kouba
>
> This month the [Weld 
> SE|https://github.com/weld/core/tree/2.3/environments/se/tests] test suite 
> suddenly started to fail on a Linux machine with Oracle JDK7 and the default 
> locale {{cs_CZ}}:
> {code}
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of 
> range: -1
>       at java.lang.String.substring(String.java:1911)
>       at 
> org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:128)
>       at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67)
>       at java.lang.Thread.run(Thread.java:745)
> {code}
> A {{java.util.logging.Logger}} is used in the forked process. The exception 
> occurs when the following log message is written to the standard output:
> {code}
> I 29, 2016 2:01:43 ODP. org.jboss.arquillian.container.se.server.Main main
> {code}
> We have found out that the timestamp *I 29, 2016 2:01:43* (i.e. 2016-01-29 
> 14:01:43) is incorrectly parsed as {{ForkingRunListener.BOOTERCODE_SYSPROPS}} 
> operation.
> I think the protocol should be robust enough to avoid similar collisions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to