You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Tibor17 <gi...@git.apache.org> on 2017/02/26 18:30:37 UTC

[GitHub] maven-surefire issue #144: Resource leaks.

Github user Tibor17 commented on the issue:

    https://github.com/apache/maven-surefire/pull/144
  
    But most of  these changes are not related to communication between JVMs.
    I spoke with Michael-O and we know the root cause. The problem is that the
    JVM does not receive data via std/in in forked JVM. Therefore the forked
    JVM is still waiting for class to test. It is not related to
    
    System.out.close(); in ForkedBooter.
    
    
    On Sun, Feb 26, 2017 at 6:14 PM, Stephen Connolly <no...@github.com>
    wrote:
    
    > *@stephenc* commented on this pull request.
    > ------------------------------
    >
    > In maven-surefire-common/src/main/java/org/apache/maven/
    > plugin/surefire/report/ConsoleOutputFileReporter.java
    > <https://github.com/apache/maven-surefire/pull/144#discussion_r103110391>:
    >
    > > @@ -69,8 +69,8 @@ public void close()
    >          {
    >              try
    >              {
    > -                fileOutputStream.flush();
    > -                fileOutputStream.close();
    > +                // fileOutputStream.flush(); Will not call close on exception!
    > +                fileOutputStream.close(); // Will implicitly flush.
    >
    > Then the correct way to do that is wrap the flush in another layer of try
    > catch (and leave a todo to use addSuppressed once baseline JVM for the code
    > is Java 7)
    >
    > \u2014
    > You are receiving this because you commented.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/maven-surefire/pull/144#discussion_r103110391>,
    > or mute the thread
    > <https://github.com/notifications/unsubscribe-auth/AA_yR4iQ5XcirBYLEhH3UZ9ue48U_3mnks5rgbMAgaJpZM4MFSQu>
    > .
    >
    
    
    
    -- 
    Cheers
    Tibor



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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