diff --git a/tests/integration/utils/kafka_server.py b/tests/integration/utils/kafka_server.py index 8e8b29e48..5b8c4b934 100644 --- a/tests/integration/utils/kafka_server.py +++ b/tests/integration/utils/kafka_server.py @@ -3,7 +3,7 @@ See LICENSE for details """ from dataclasses import dataclass -from kafka.errors import LeaderNotAvailableError, NoBrokersAvailable, UnrecognizedBrokerVersion +from kafka.errors import AuthenticationFailedError from karapace.kafka_admin import KafkaAdminClient from karapace.utils import Expiration from pathlib import Path @@ -51,21 +51,7 @@ def wait_for_kafka( ) try: KafkaAdminClient(bootstrap_servers=server).cluster_metadata() - # ValueError: - # - if the port number is invalid (i.e. not a number) - # - if the port is not bound yet - # NoBrokersAvailable: - # - if the address/port does not point to a running server - # LeaderNotAvailableError: - # - if there is no leader yet - # UnrecognizedBrokerVersion: - # - happens during start-up of dockerized Kafka - except ( - NoBrokersAvailable, - LeaderNotAvailableError, - UnrecognizedBrokerVersion, - ValueError, - ) as e: + except AuthenticationFailedError as e: print(f"Error checking kafka cluster: {e}") time.sleep(2.0) else: