We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52fd979 commit 033f777Copy full SHA for 033f777
tests/instrumentation/kafka_tests.py
@@ -40,7 +40,7 @@
40
41
kafka = pytest.importorskip("kafka")
42
43
-from kafka import KafkaConsumer, KafkaProducer
+from kafka import KafkaClient, KafkaConsumer, KafkaProducer
44
from kafka.admin import KafkaAdminClient, NewTopic
45
46
pytestmark = [pytest.mark.kafka]
@@ -57,6 +57,13 @@ def topics():
57
admin_client.create_topics([NewTopic(name, num_partitions=1, replication_factor=1) for name in topics])
58
yield topics
59
admin_client.delete_topics(topics)
60
+ client = KafkaClient(bootstrap_servers=[f"{KAFKA_HOST}:9092"])
61
+ try:
62
+ future = client.cluster.request_update()
63
+ client.poll(future=future)
64
+ except Exception as e:
65
+ print(e)
66
+ pass
67
68
69
@pytest.fixture()
0 commit comments