Repository: bookkeeper
Updated Branches:
  refs/heads/master 057af8dbc -> 5d282dcea


BOOKKEEPER-1045: Execute tests in different JVM processes

The current Maven Surefire configuration is using:
```xml
<forkMode>always</forkMode>
```

This is a deprecated config and apparently it's not creating new processes for 
each test as intended.

Currently the tests are leaking a big number of files and threads due to 
several reasons:
 * Tests that instantiate bookies and call shutdown() without calling start() 
before are creating and initializing the ledger storage but not closing it, 
leaking threads and several fds
  * ZooKeeperClient sometimes doesn't shutdown the zk handle if the test 
completes too quickly, leaking sockets.
 * Several tests are passing bad config, so the bookie/client start gets 
exception (on purpose) and then doesn't clean up some partial objects.
 * ...

That make running the test suite to be dependent on ulimit of the machine.

Until we can fix (almost) all the test to do proper cleanup, we should make 
maven to run tests in separated processes.

Author: Matteo Merli <[email protected]>

Reviewers: Enrico Olivelli<[email protected]>, Jia Zhai <[email protected]>

Closes #135 from merlimat/bk-1045-test-forks


Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/5d282dce
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/5d282dce
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/5d282dce

Branch: refs/heads/master
Commit: 5d282dceae140577b97a12db5b2b531c7d84e985
Parents: 057af8d
Author: Matteo Merli <[email protected]>
Authored: Thu May 4 10:27:44 2017 +0200
Committer: eolivelli <[email protected]>
Committed: Thu May 4 10:27:44 2017 +0200

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/5d282dce/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4b2eb3c..3a7a770 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,7 @@
         <configuration>
           <argLine>-Xmx2G -Djava.net.preferIPv4Stack=true</argLine>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-         <forkMode>always</forkMode>
+         <reuseForks>false</reuseForks>
          <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
         </configuration>
       </plugin>

Reply via email to