You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by kk...@apache.org on 2020/07/14 19:25:56 UTC

[kafka] branch 2.6 updated: MINOR: Remove call to Exit.exit() to prevent infinite recursion in Connect integration tests (#9015)

This is an automated email from the ASF dual-hosted git repository.

kkarantasis pushed a commit to branch 2.6
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.6 by this push:
     new 7b366dc  MINOR: Remove call to Exit.exit() to prevent infinite recursion in Connect integration tests (#9015)
7b366dc is described below

commit 7b366dc1a4d60d41cda22d7af9e6d0b8c6388cfb
Author: Arjun Satish <wi...@users.noreply.github.com>
AuthorDate: Tue Jul 14 11:59:34 2020 -0700

    MINOR: Remove call to Exit.exit() to prevent infinite recursion in Connect integration tests (#9015)
    
    If we call org.apache.kafka.common.utils.Exit#exit(int code) with code=0, the current implementation will go into an infinite recursion and kill the VM with a stack overflow error. This happens only in integration tests because of the overrides of shutdown procedures and this commit addresses this issue by removing the redundant call to Exit#exit.
    
    Reviewers: Lucas Bradstreet <lu...@confluent.io>, Konstantine Karantasis <k....@gmail.com>, Chia-Ping Tsai <ch...@gmail.com>
---
 .../org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java  | 2 --
 1 file changed, 2 deletions(-)

diff --git a/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java b/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java
index cb56c9d..170ad34 100644
--- a/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java
+++ b/connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java
@@ -112,7 +112,6 @@ public class EmbeddedConnectCluster {
             log.warn(exitMessage);
             throw new UngracefulShutdownException(exitMessage);
         }
-        Exit.exit(0, message);
     };
 
     /**
@@ -124,7 +123,6 @@ public class EmbeddedConnectCluster {
             log.warn(haltMessage);
             throw new UngracefulShutdownException(haltMessage);
         }
-        Exit.halt(0, message);
     };
 
     /**