You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/11/12 21:35:10 UTC

[GitHub] [cassandra] yifan-c commented on a change in pull request #820: CASSANDRA-16270 - jvm-dtest nodetool doesn't handle System.exit

yifan-c commented on a change in pull request #820:
URL: https://github.com/apache/cassandra/pull/820#discussion_r522440427



##########
File path: test/distributed/org/apache/cassandra/distributed/impl/Instance.java
##########
@@ -607,7 +607,35 @@ public NodeToolResult nodetoolResult(boolean withNotifications, String... comman
             try (CapturingOutput output = new CapturingOutput())
             {
                 DTestNodeTool nodetool = new DTestNodeTool(withNotifications, output.delegate);
-                int rc = nodetool.execute(commandAndArgs);
+                // install security manager to get informed about the exit-code
+                System.setSecurityManager(new SecurityManager()

Review comment:
       Indeed an interesting approach to intercept `System.exit` using security manager!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org