You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by di...@apache.org on 2024/01/02 20:11:24 UTC

(kafka) branch trunk updated: KAFKA-16063: Disable shutdownhook in MiniKdc (used for testing) (#15104)

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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 86a387c3c8f KAFKA-16063: Disable shutdownhook in MiniKdc (used for testing) (#15104)
86a387c3c8f is described below

commit 86a387c3c8fdb87ea80f5fb09ea79da8204a3f82
Author: Arpit Goyal <go...@gmail.com>
AuthorDate: Wed Jan 3 01:41:18 2024 +0530

    KAFKA-16063: Disable shutdownhook in MiniKdc (used for testing) (#15104)
    
    This stops a memory leaked in the tests caused due to ApplicationShutdownHooks
    
    Reviewers: Divij Vaidya <di...@amazon.com>
---
 core/src/test/scala/kafka/security/minikdc/MiniKdc.scala | 1 +
 1 file changed, 1 insertion(+)

diff --git a/core/src/test/scala/kafka/security/minikdc/MiniKdc.scala b/core/src/test/scala/kafka/security/minikdc/MiniKdc.scala
index 8cae0593c1f..0ca1389562c 100644
--- a/core/src/test/scala/kafka/security/minikdc/MiniKdc.scala
+++ b/core/src/test/scala/kafka/security/minikdc/MiniKdc.scala
@@ -178,6 +178,7 @@ class MiniKdc(config: Properties, workDir: File) extends Logging {
 
     // And start the ds
     ds.setInstanceId(config.getProperty(MiniKdc.Instance))
+    ds.setShutdownHookEnabled(false)
     ds.startup()
 
     // context entry, after ds.startup()