@@ -509,7 +509,7 @@ def test_partition_records_offset():
509
509
fetch_offset = 123
510
510
tp = TopicPartition ('foo' , 0 )
511
511
messages = [ConsumerRecord (tp .topic , tp .partition , i ,
512
- None , None , 'key' , 'value' , 'checksum' , 0 , 0 )
512
+ None , None , 'key' , 'value' , [], 'checksum' , 0 , 0 , - 1 )
513
513
for i in range (batch_start , batch_end )]
514
514
records = Fetcher .PartitionRecords (fetch_offset , None , messages )
515
515
assert len (records ) > 0
@@ -534,7 +534,7 @@ def test_partition_records_no_fetch_offset():
534
534
fetch_offset = 123
535
535
tp = TopicPartition ('foo' , 0 )
536
536
messages = [ConsumerRecord (tp .topic , tp .partition , i ,
537
- None , None , 'key' , 'value' , 'checksum' , 0 , 0 )
537
+ None , None , 'key' , 'value' , None , 'checksum' , 0 , 0 , - 1 )
538
538
for i in range (batch_start , batch_end )]
539
539
records = Fetcher .PartitionRecords (fetch_offset , None , messages )
540
540
assert len (records ) == 0
@@ -549,7 +549,7 @@ def test_partition_records_compacted_offset():
549
549
fetch_offset = 42
550
550
tp = TopicPartition ('foo' , 0 )
551
551
messages = [ConsumerRecord (tp .topic , tp .partition , i ,
552
- None , None , 'key' , 'value' , 'checksum' , 0 , 0 )
552
+ None , None , 'key' , 'value' , None , 'checksum' , 0 , 0 , - 1 )
553
553
for i in range (batch_start , batch_end ) if i != fetch_offset ]
554
554
records = Fetcher .PartitionRecords (fetch_offset , None , messages )
555
555
assert len (records ) == batch_end - fetch_offset - 1
0 commit comments