Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/kafkatest/services/kafka/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,7 @@ def run_features_command(self, op, feature, new_version):
def pids(self, node):
"""Return process ids associated with running processes on the given node."""
try:
cmd = "ps ax | grep -i %s | grep -v grep | awk '{print $1}'" % self.java_class_name()
pid_arr = [pid for pid in node.account.ssh_capture(cmd, allow_fail=True, callback=int)]
return pid_arr
return node.account.java_pids(self.java_class_name())
except (RemoteCommandError, ValueError) as e:
return []

Expand Down Expand Up @@ -1935,4 +1933,4 @@ def get_offset_shell(self, time=None, topic=None, partitions=None, topic_partiti
return output

def java_class_name(self):
return "kafka.Kafka"
return "kafka\.Kafka"