summaryrefslogtreecommitdiffstats
path: root/csit/resources/tests/kafka_consumer.py
diff options
context:
space:
mode:
Diffstat (limited to 'csit/resources/tests/kafka_consumer.py')
-rwxr-xr-xcsit/resources/tests/kafka_consumer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/csit/resources/tests/kafka_consumer.py b/csit/resources/tests/kafka_consumer.py
index 595e3db7..fa173f47 100755
--- a/csit/resources/tests/kafka_consumer.py
+++ b/csit/resources/tests/kafka_consumer.py
@@ -27,9 +27,9 @@ import sys
import time
-def consume_kafka_topic(topic, expected_values, timeout):
+def consume_kafka_topic(topic, expected_values, timeout, bootstrap_server):
config = {
- 'bootstrap.servers': 'localhost:29092',
+ 'bootstrap.servers': bootstrap_server,
'group.id': 'testgrp',
'auto.offset.reset': 'earliest'
}
@@ -63,4 +63,5 @@ if __name__ == '__main__':
topic_name = sys.argv[1]
timeout = int(sys.argv[2]) # timeout in seconds for verifying the kafka topic
expected_values = sys.argv[3]
- consume_kafka_topic(topic_name, expected_values, timeout)
+ bootstrap_server = sys.argv[4]
+ consume_kafka_topic(topic_name, expected_values, timeout, bootstrap_server)