This is an automated email from the ASF dual-hosted git repository. rhauch pushed a commit to branch 1.1 in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/1.1 by this push: new 0f4502f KAFKA-8418: Wait until REST resources are loaded when starting a Connect Worker. (#6840) 0f4502f is described below commit 0f4502fdd8b6fcd83f591c65652baa0c13a2558e Author: Alex Diachenko <sansanic...@gmail.com> AuthorDate: Thu May 30 12:01:00 2019 -0700 KAFKA-8418: Wait until REST resources are loaded when starting a Connect Worker. (#6840) Author: Alex Diachenko <sansanic...@gmail.com> Reviewers: Arjun Satish <ar...@confluent.io>, Konstantine Karantasis <konstant...@confluent.io>, Randall Hauch <rha...@gmail.com> --- tests/kafkatest/services/connect.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/kafkatest/services/connect.py b/tests/kafkatest/services/connect.py index 69690da..9d6026f 100644 --- a/tests/kafkatest/services/connect.py +++ b/tests/kafkatest/services/connect.py @@ -20,7 +20,6 @@ import signal import time import requests -from ducktape.cluster.remoteaccount import RemoteCommandError from ducktape.errors import DucktapeError from ducktape.services.service import Service from ducktape.utils.util import wait_until @@ -90,12 +89,12 @@ class ConnectServiceBase(KafkaPathResolverMixin, Service): def listening(self, node): try: - cmd = "nc -z %s %s" % (node.account.hostname, self.CONNECT_REST_PORT) - node.account.ssh_output(cmd, allow_fail=False) - self.logger.debug("Connect worker started accepting connections at: '%s:%s')", node.account.hostname, + self.list_connectors(node) + self.logger.debug("Connect worker started serving REST at: '%s:%s')", node.account.hostname, self.CONNECT_REST_PORT) return True - except (RemoteCommandError, ValueError) as e: + except requests.exceptions.ConnectionError: + self.logger.debug("REST resources are not loaded yet") return False def start(self, mode=STARTUP_MODE_LISTEN):