Skip to content

Commit f092aaa

Browse files
dpkp88manpreet
authored andcommitted
Use fixture hostname (dont assume localhost)
1 parent 86460c2 commit f092aaa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/test_consumer_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
def get_connect_str(kafka_broker):
19-
return 'localhost:' + str(kafka_broker.port)
19+
return kafka_broker.host + ':' + str(kafka_broker.port)
2020

2121

2222
@pytest.fixture

test/test_producer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_end_to_end(kafka_broker, compression):
3535
elif platform.python_implementation() == 'PyPy':
3636
return
3737

38-
connect_str = 'localhost:' + str(kafka_broker.port)
38+
connect_str = ':'.join([kafka_broker.host, str(kafka_broker.port)])
3939
producer = KafkaProducer(bootstrap_servers=connect_str,
4040
retries=5,
4141
max_block_ms=10000,

0 commit comments

Comments
 (0)