Antoine Tran created STORM-2437:
-----------------------------------

             Summary: LocalCluster in Unit Test crash the VM
                 Key: STORM-2437
                 URL: https://issues.apache.org/jira/browse/STORM-2437
             Project: Apache Storm
          Issue Type: Improvement
          Components: storm-core
    Affects Versions: 1.0.3
         Environment: Linux CentOs7
Eclipse Mars 2
Maven 3.3.9 with recent version of surefire, in forkCount=1 reuseFork=false
            Reporter: Antoine Tran
            Priority: Minor


When unit testing Storm, we use LocalCluster. There is nothing to say when the 
Unit Test is working, the Unit Test ends gracefully.

However, when there are RuntimeException, for instance in the prepare 
functions, Storm crash and calls in Utils.mkSuicideFn, which calls 
Runtime.getRuntime().exit. So the VM crash and this is contradictory to Maven 
Surefire design 
(http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#vm-termination).

I searched many ways to either prevent Storm from exiting (using 
SecurityManager), or make Unit Test accept the crash of the forked process.

If the Unit Test s VM crash, surefire will be unable to continue. My suggestion 
is to allow a configuration of LocalCluster that avoids System.exit, but just 
kills the topology (and closes all ressources if possible, but in the short 
term, this is not really important in a forked process).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to