Browse Source

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 <lucas@confluent.io>, Konstantine Karantasis <k.karantasis@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
pull/9026/head
Arjun Satish 4 years ago committed by GitHub
parent
commit
f699bd98c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java

2
connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectCluster.java

@ -112,7 +112,6 @@ public class EmbeddedConnectCluster { @@ -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 { @@ -124,7 +123,6 @@ public class EmbeddedConnectCluster {
log.warn(haltMessage);
throw new UngracefulShutdownException(haltMessage);
}
Exit.halt(0, message);
};
/**

Loading…
Cancel
Save