[
https://issues.apache.org/jira/browse/STORM-2437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645371#comment-17645371
]
Ben Roling commented on STORM-2437:
-----------------------------------
It appears this is still an issue, even in the latest release (2.4.0). I'm
kinda surprised there hasn't been any more discussion here. Combined with
https://issues.apache.org/jira/browse/SUREFIRE-2095, this is a frustrating
issue. CI builds can pass when a maven-failsafe-plugin integration test uses
LocalCluster and LocalCluster exits the JVM. I wonder, is there more
discussion of this somewhere else? We've got a project like this that uses
LocalCluster in tests and some tests that should be failing are not being
noticed due to this issue.
> 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
(v8.20.10#820010)