summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeikki Nousiainen <htn@aiven.io>2018-08-14 15:38:42 +0300
committerJeff Widman <jeff@jeffwidman.com>2018-09-27 15:22:03 -0700
commit0ca4313170df2657456009af5550942ace9f1a81 (patch)
treecb39f5b2e6823a8dac73ca0313ff0a68bd96c572 /test
parent9d30ab8bdbbd7e722ba4a96a6883a965d577d3cc (diff)
downloadkafka-python-0ca4313170df2657456009af5550942ace9f1a81.tar.gz
Expose record headers in ConsumerRecords
Diffstat (limited to 'test')
-rw-r--r--test/test_fetcher.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_fetcher.py b/test/test_fetcher.py
index c821018..e37a70d 100644
--- a/test/test_fetcher.py
+++ b/test/test_fetcher.py
@@ -509,7 +509,7 @@ def test_partition_records_offset():
fetch_offset = 123
tp = TopicPartition('foo', 0)
messages = [ConsumerRecord(tp.topic, tp.partition, i,
- None, None, 'key', 'value', 'checksum', 0, 0)
+ None, None, 'key', 'value', [], 'checksum', 0, 0, -1)
for i in range(batch_start, batch_end)]
records = Fetcher.PartitionRecords(fetch_offset, None, messages)
assert len(records) > 0
@@ -534,7 +534,7 @@ def test_partition_records_no_fetch_offset():
fetch_offset = 123
tp = TopicPartition('foo', 0)
messages = [ConsumerRecord(tp.topic, tp.partition, i,
- None, None, 'key', 'value', 'checksum', 0, 0)
+ None, None, 'key', 'value', None, 'checksum', 0, 0, -1)
for i in range(batch_start, batch_end)]
records = Fetcher.PartitionRecords(fetch_offset, None, messages)
assert len(records) == 0
@@ -549,7 +549,7 @@ def test_partition_records_compacted_offset():
fetch_offset = 42
tp = TopicPartition('foo', 0)
messages = [ConsumerRecord(tp.topic, tp.partition, i,
- None, None, 'key', 'value', 'checksum', 0, 0)
+ None, None, 'key', 'value', None, 'checksum', 0, 0, -1)
for i in range(batch_start, batch_end) if i != fetch_offset]
records = Fetcher.PartitionRecords(fetch_offset, None, messages)
assert len(records) == batch_end - fetch_offset - 1