You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/04 11:58:02 UTC

[GitHub] [ozone] sodonnel commented on a change in pull request #2959: HDDS-6123. Disable system exit in integration tests

sodonnel commented on a change in pull request #2959:
URL: https://github.com/apache/ozone/pull/2959#discussion_r778027019



##########
File path: hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/server/TestSecureContainerServer.java
##########
@@ -125,6 +127,7 @@
   @BeforeClass
   public static void setup() throws Exception {
     DefaultMetricsSystem.setMiniClusterMode(true);
+    ExitUtils.disableSystemExit();

Review comment:
       The changes in this PR make sense to me, expecially the change inside MiniOzoneCluster, so that if you use a mini-ozone cluster it automatically calls `disableSystemExit()` and individual tests don't need to worry about it.
   
   However the change like this one gives me a little bit of concern. How easy would it be for someone to add a new test class that calls some code with a `System.exit()` they have no idea about? Have we any other way to make this problem invisible to tests somehow? Perhaps there is no other feasible way to fix this, but thought I would ask anyway.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org