Skip to content

Commit

Permalink
fix kafka tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Sep 13, 2024
1 parent c6f9204 commit a52c255
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions logprep/connector/confluent_kafka/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,10 @@ def health(self) -> bool:
self.metrics.number_of_errors += 1
return False
return super().health()

def setup(self) -> None:
"""Set the component up."""
try:
super().setup()
except KafkaException as error:
raise FatalInputError(self, f"Could not setup kafka consumer: {error}") from error
7 changes: 7 additions & 0 deletions logprep/connector/confluent_kafka/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,10 @@ def health(self) -> bool:
self.metrics.number_of_errors += 1
return False
return super().health()

def setup(self) -> None:
"""Set the component up."""
try:
super().setup()
except KafkaException as error:
raise FatalOutputError(self, f"Could not setup kafka producer: {error}") from error

0 comments on commit a52c255

Please sign in to comment.