Skip to content

Commit

Permalink
BDD test added for compression in sha extractro
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Drobena committed Feb 13, 2024
1 parent 55419bb commit 22d63bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion features/src/kafka_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def consume_event(bootstrap, topic, group_id=None):
consumer.subscribe(topics=topic)
return consumer.poll()

def consume_one_message_from_topic(bootsrap, topic):
def consume_message_from_topic(bootsrap, topic):
"""Consume one messages in given topic."""
consumer = KafkaConsumer(
topic,
Expand Down
4 changes: 2 additions & 2 deletions features/steps/insights_sha_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def compressed_archive_sent_to_topic(context):
"""Check that sha extractor did not process any event."""
decoded = None
error= None
message = kafka_util.consume_one_message_from_topic(context.kafka_hostname, context.outgoing_topic)
message = kafka_util.consume_message_from_topic(context.kafka_hostname, context.outgoing_topic)
try:
decoded = gzip.decompress(message.value)
except Exception as err:
Expand All @@ -249,7 +249,7 @@ def no_compressed_archive_sent_to_topic(context):
"""Check that sha extractor did not process any event."""
decoded = None
error= None
message = kafka_util.consume_one_message_from_topic(context.kafka_hostname, context.outgoing_topic)
message = kafka_util.consume_message_from_topic(context.kafka_hostname, context.outgoing_topic)
try:
decoded = gzip.decompress(message.value)
except Exception as err:
Expand Down

0 comments on commit 22d63bb

Please sign in to comment.