kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch 2.0 updated: MINOR: Fix minikdc cleanup in system tests (#5471)
Date Tue, 07 Aug 2018 20:25:27 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/2.0 by this push:
     new 93221a1  MINOR: Fix minikdc cleanup in system tests (#5471)
93221a1 is described below

commit 93221a1ef44e699fe6169860b3bb86b18c54c3a4
Author: Arjun Satish <wicknicks@users.noreply.github.com>
AuthorDate: Tue Aug 7 11:08:51 2018 -0700

    MINOR: Fix minikdc cleanup in system tests (#5471)
    
    The original way of stopping the minikdc process sometimes misfires because the process
arg string is very long, and `ps` is not able to find the correct process. Using the `kill_java_processes`
method is more reliable for finding and killing java processes.
---
 tests/kafkatest/services/security/minikdc.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/kafkatest/services/security/minikdc.py b/tests/kafkatest/services/security/minikdc.py
index 86a7138..f26b379 100644
--- a/tests/kafkatest/services/security/minikdc.py
+++ b/tests/kafkatest/services/security/minikdc.py
@@ -123,10 +123,10 @@ class MiniKdc(KafkaPathResolverMixin, Service):
 
     def stop_node(self, node):
         self.logger.info("Stopping %s on %s" % (type(self).__name__, node.account.hostname))
-        node.account.kill_process("apacheds", allow_fail=False)
+        node.account.kill_java_processes("MiniKdc", clean_shutdown=True, allow_fail=False)
 
     def clean_node(self, node):
-        node.account.kill_process("apacheds", clean_shutdown=False, allow_fail=False)
+        node.account.kill_java_processes("MiniKdc", clean_shutdown=False, allow_fail=True)
         node.account.ssh("rm -rf " + MiniKdc.WORK_DIR, allow_fail=False)
         if os.path.exists(MiniKdc.LOCAL_KEYTAB_FILE):
             os.remove(MiniKdc.LOCAL_KEYTAB_FILE)


Mime
View raw message