Merge "Confluent Kafka driver broker option bug"

This commit is contained in:
Zuul 2019-08-12 15:32:04 +00:00 committed by Gerrit Code Review
commit a6843fdd3b
2 changed files with 4 additions and 6 deletions

View File

@ -29,8 +29,8 @@ class KafkaConsumer(object):
"""
Create new high-level Consumer instance.
:param list(str) bootstrap_servers: A list of host/port pairs to use
for establishing the initial connection to the Kafka cluster.
:param str bootstrap_servers: Comma separated list of host/port pairs to
use for establishing the initial connection to the Kafka cluster.
:param str group_id: A unique string that identifies the consumer group
this consumer belongs to.
:param str topic: Topic to subscribe to.

View File

@ -101,8 +101,7 @@ class TestConfluentKafkaConsumer(base.BaseTestCase):
def setUp(self, mock_confluent_consumer):
super(TestConfluentKafkaConsumer, self).setUp()
self.mock_confluent_consumer = mock_confluent_consumer
self.consumer = consumer.KafkaConsumer(['fake_server1',
'fake_server2'],
self.consumer = consumer.KafkaConsumer('fake_server1,fake_server2',
'fake_group',
FAKE_KAFKA_TOPIC, 128,
'test_client',
@ -124,8 +123,7 @@ class TestConfluentKafkaConsumer(base.BaseTestCase):
def test_kafka_consumer_init(self):
expected_config = {'group.id': 'fake_group',
'session.timeout.ms': 10000,
'bootstrap.servers': ['fake_server1',
'fake_server2'],
'bootstrap.servers': 'fake_server1,fake_server2',
'fetch.min.bytes': 128,
'client.id': 'test_client',
'enable.auto.commit': False,