From b81d610f7bc0d3222ab09451c5a040d8cf761ad6 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Mon, 20 Apr 2026 10:34:12 -0700 Subject: [PATCH] Create topic on 0.8.2 broker to fix bootstrap --- test/integration/fixtures.py | 5 +++++ test/integration/test_consumer_integration.py | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/fixtures.py b/test/integration/fixtures.py index 30246f90a..4bb35ca8f 100644 --- a/test/integration/fixtures.py +++ b/test/integration/fixtures.py @@ -541,6 +541,11 @@ def start(self): else: raise RuntimeError('Failed to start KafkaInstance before max_timeout') + if env_kafka_version() < (0, 9): + # broker requires at least one topic for bootstrap to return brokers list + log.info('Creating _bootstrap_fixup_ topic for broker %s', (env_kafka_version(),)) + create_topics(self, ['_bootstrap_fixup_']) + self.out("Done!") self.running = True diff --git a/test/integration/test_consumer_integration.py b/test/integration/test_consumer_integration.py index 8951ef98e..f5c848f17 100644 --- a/test/integration/test_consumer_integration.py +++ b/test/integration/test_consumer_integration.py @@ -16,8 +16,6 @@ def test_consumer(consumer): - # The `topic` fixture is included because - # 0.8.2 brokers need a topic to function well consumer.poll(timeout_ms=500) assert consumer._client.cluster.brokers()