[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-09-21 Thread Martin Kouba (JIRA)

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

Martin Kouba commented on SUREFIRE-1222:


[~tibor17] Thanks a lot! I've created 
https://github.com/arquillian/arquillian-container-se/issues/14 to track the 
Arquillian SE adapter issue.

> 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)


[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-09-20 Thread Martin Kouba (JIRA)

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

Martin Kouba commented on SUREFIRE-1222:


Ok Tibor, thanks for the link. So you're basically saying that it's not 
possible to start a new process and redirect the output to the standard output 
of the current process (forked surefire process). Instead, we should observe 
the standard output of the new process and {{System.out.write()}} in the parent 
process, like e.g. WildFly Arquillian managed adapter: 
https://github.com/wildfly/wildfly-arquillian/blob/master/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java#L138

Is there any reason for this limitation? To me both solutions seem legitimate.

By the way, this is a very simple reproducer:
{code:java}
public class SimpleTest {

@Test
public void testDummy() throws IOException {
   new ProcessBuilder("echo", "I 29, 2016 2:01:43 
ODP.").redirectOutput(Redirect.INHERIT).start();
}
}
{code}

> 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)


[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-09-20 Thread Martin Kouba (JIRA)

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

Martin Kouba commented on SUREFIRE-1222:


Hi Tibor,
Well, the tests do not call {{System.setOut()}} but the [Arquillian 
adapter|https://github.com/arquillian/arquillian-container-se] creates a new 
process and then redirects its output (i.e. calls 
{{java.lang.ProcessBuilder.redirectOutput(Redirect)}}) to the output of the JVM 
which runs the test. 

In any case, I think that 
[ForkClient.consumeLine()|http://grepcode.com/file/repo1.maven.org/maven2/org.apache.maven.surefire/maven-surefire-common/2.18.1/org/apache/maven/plugin/surefire/booterclient/output/ForkClient.java#85]
 should expect similar lines (containing comma and code) and ignore them. E.g. 
the code/operationId could be prefixed with some uncommon prefix... e.g. 
{{:::I}} instead of {{I}} for BOOTERCODE_SYSPROPS.

> 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)


[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-02-02 Thread Martin Kouba (JIRA)

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

Martin Kouba commented on SUREFIRE-1222:


* use JDK7
* the JVM default locale must be {{cs_CZ}}
* set the date to any day in Jan 2016
* {{git clone g...@github.com:weld/core.git}}
* {{checkout 2.3}}
* {{cd environments/se/tests/}}
* {{mvn clean test}}

> 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)


[jira] [Commented] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-02-01 Thread Martin Kouba (JIRA)

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

Martin Kouba commented on SUREFIRE-1222:


[~tibor17] I get the same error for 2.19.1. By the way, 2.17 does not look that 
old (12-Mar-2014). A lot of projects out there probably don't use the most 
recent versions of dependencies.

> 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)


[jira] [Created] (SUREFIRE-1222) ForkClient attempts to consume unrelated lines

2016-01-29 Thread Martin Kouba (JIRA)
Martin Kouba created SUREFIRE-1222:
--

 Summary: 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)