You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by vv...@apache.org on 2020/09/30 15:21:26 UTC
[kafka] branch 2.6 updated: MINOR: Do not swallow exception when
collecting PIDs (#8914)
This is an automated email from the ASF dual-hosted git repository.
vvcephei 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 a93de87 MINOR: Do not swallow exception when collecting PIDs (#8914)
a93de87 is described below
commit a93de873a51601c66cc6fd3fb8b18a52085a3e8b
Author: Bruno Cadonna <br...@confluent.io>
AuthorDate: Tue Jun 30 19:18:23 2020 +0200
MINOR: Do not swallow exception when collecting PIDs (#8914)
During Streams' system tests the PIDs of the Streams
clients are collected. The method the collects the PIDs
swallows any exception that might be thrown by the
ssh_capture() function. Swallowing any exceptions
might make the investigation of failures harder,
because no information about what happened are recorded.
Reviewers: John Roesler <vv...@apache.org>
---
tests/kafkatest/services/streams.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/kafkatest/services/streams.py b/tests/kafkatest/services/streams.py
index e20ac57..66be72d 100644
--- a/tests/kafkatest/services/streams.py
+++ b/tests/kafkatest/services/streams.py
@@ -17,6 +17,7 @@ import os.path
import signal
import streams_property
import consumer_property
+from ducktape.cluster.remoteaccount import RemoteCommandError
from ducktape.services.service import Service
from ducktape.utils.util import wait_until
from kafkatest.directory_layout.kafka_path import KafkaPathResolverMixin
@@ -228,8 +229,10 @@ class StreamsTestBaseService(KafkaPathResolverMixin, JmxMixin, Service):
def pids(self, node):
try:
- return [pid for pid in node.account.ssh_capture("cat " + self.PID_FILE, callback=int)]
- except:
+ pids = [pid for pid in node.account.ssh_capture("cat " + self.PID_FILE, callback=str)]
+ return [int(pid) for pid in pids]
+ except Exception, exception:
+ self.logger.debug(str(exception))
return []
def stop_nodes(self, clean_shutdown=True):