[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2017-01-03 Thread jsdima
Github user jsdima commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
you are welcome



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2016-12-30 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
@jsdima 
Thx for contributing. Pls close this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2016-12-30 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
@jsdima 
Long time I was thinking about deleting the class `ThreadedStreamConsumer`. 
It looks like old mechanism where data was populated from multiple 
`ForkStarter`s but this is no longer valid. Each method `ForkStarter#fork()` 
L532 already uses single Thread started by `executeCommandLineAsCallable()`. It 
means that `ThreadedStreamConsumer` the plugin does not benefit from the pumper 
and the blocking queue. WDYT?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2016-12-30 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
@jsdima 
The constructor of `BlockingQueue` takes capacity of 2xE09 which 
practically means no limitation.
The only operation which can block is `queue.take()`. What call sequences 
may cause that the `ForkClient` hangs?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2016-12-30 Thread jsdima
Github user jsdima commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
@Tibor17 

>I am interested in this problem because as you said the plugin hangs. Why 
the plugin hanged, do you have explanation?

It depends on a size of `private final BlockingQueue items` 
in `ThreadedStreamConsumer` at the moment when Exception happens and amount 
of tests output .

Surefire plugin has 3 important threads when running tests in separate 
process:
- `StreamPumper` thread which reads input from child process and put them 
to `items`, it finishes when there is no more input from child process
- `ThreadedStreamConsumer.Pumper`thread which takes line from `items` and 
call `ForkClient`to process it
- `Main` thread which awaits when `StreamPumper` finishes

so when exception happens `ThreadedStreamConsumer.Pumper`thread ends, but  
`StreamPumper` still reads input and put in into `items`, but when size of 
`items` becomes bigger than `ITEM_LIMIT_BEFORE_SLEEP`, this thread starts sleep 
every iteration:

```java
if ( items.size() > ITEM_LIMIT_BEFORE_SLEEP )
{
try
{
Thread.sleep( 100 );
}
catch ( InterruptedException ignore )
{
}
}
```

> Did you run the build with your patch? It means mvn -P run-its install.

Yes. The result:
```
[INFO] 

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Maven Surefire .. SUCCESS [ 
10.423 s]
[INFO] SureFire Logger API  SUCCESS [  
3.082 s]
[INFO] ShadeFire JUnit3 Provider .. SUCCESS [  
1.926 s]
[INFO] SureFire API ... SUCCESS [  
4.787 s]
[INFO] SureFire Booter  SUCCESS [  
2.016 s]
[INFO] Maven Surefire Test-Grouping Support ... SUCCESS [  
1.859 s]
[INFO] SureFire Providers . SUCCESS [  
0.650 s]
[INFO] Shared JUnit3 Provider Code  SUCCESS [  
0.870 s]
[INFO] Shared Java 5 Provider Base  SUCCESS [  
1.300 s]
[INFO] Shared JUnit4 Provider Code  SUCCESS [  
1.164 s]
[INFO] Shared JUnit48 Provider Code ... SUCCESS [  
2.048 s]
[INFO] SureFire JUnit Runner .. SUCCESS [  
0.857 s]
[INFO] SureFire JUnit4 Runner . SUCCESS [  
1.505 s]
[INFO] Maven Surefire Common .. SUCCESS [  
7.801 s]
[INFO] SureFire JUnitCore Runner .. SUCCESS [ 
51.535 s]
[INFO] SureFire TestNG Utils .. SUCCESS [  
1.158 s]
[INFO] SureFire TestNG Runner . SUCCESS [  
1.222 s]
[INFO] Surefire Report Parser . SUCCESS [  
1.460 s]
[INFO] Maven Surefire Plugin .. SUCCESS [  
5.049 s]
[INFO] Maven Failsafe Plugin .. SUCCESS [ 
47.971 s]
[INFO] Maven Surefire Report Plugin ... SUCCESS [  
8.128 s]
[INFO] Maven Surefire Integration Test Setup .. SUCCESS [  
9.125 s]
[INFO] Maven Surefire Integration Tests ... SUCCESS [47:52 
min]
[INFO] 

[INFO] BUILD SUCCESS
[INFO] 

[INFO] Total time: 50:39 min
[INFO] Finished at: 2016-12-30T14:34:19+03:00
[INFO] Final Memory: 79M/1118M
[INFO] 

```

> The issue [1] you pointed out happens after your fix or without it?

before applying the fix


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



[GitHub] maven-surefire issue #137: Fix SUREFIRE-1239

2016-12-29 Thread Tibor17
Github user Tibor17 commented on the issue:

https://github.com/apache/maven-surefire/pull/137
  
@jsdima 
I am interested in this problem because as you said the plugin hangs.  Why 
the plugin hanged, do you have explanation?
Did you run the build with your patch? It means `mvn -P run-its install`.
The issue [1] you pointed out happens after your fix or without it?
[1] `[ERROR] Failed to execute goal...`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org