Skip to content

Commit

Permalink
Avoid logging errors during test fixture cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dpkp committed Feb 6, 2025
1 parent bfbee93 commit 61c8494
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def kafka_run_class_env(self):
return env

def out(self, message):
log.info("*** Zookeeper [%s:%s]: %s", self.host, self.port or '(auto)', message)
if len(log.handlers) > 0:
log.info("*** Zookeeper [%s:%s]: %s", self.host, self.port or '(auto)', message)

def open(self):
if self.tmp_dir is None:
Expand Down Expand Up @@ -381,7 +382,8 @@ def kafka_run_class_env(self):
return env

def out(self, message):
log.info("*** Kafka [%s:%s]: %s", self.host, self.port or '(auto)', message)
if len(log.handlers) > 0:
log.info("*** Kafka [%s:%s]: %s", self.host, self.port or '(auto)', message)

def _create_zk_chroot(self):
self.out("Creating Zookeeper chroot node...")
Expand Down

0 comments on commit 61c8494

Please sign in to comment.