diff options
Diffstat (limited to 'test/test_fetcher.py')
-rw-r--r-- | test/test_fetcher.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/test/test_fetcher.py b/test/test_fetcher.py index ef3f686..429071a 100644 --- a/test/test_fetcher.py +++ b/test/test_fetcher.py @@ -303,29 +303,6 @@ def test__handle_offset_response(fetcher, mocker): assert isinstance(fut.exception, NotLeaderForPartitionError) -def test_partition_records_offset(): - """Test that compressed messagesets are handled correctly - when fetch offset is in the middle of the message list - """ - batch_start = 120 - batch_end = 130 - fetch_offset = 123 - tp = TopicPartition('foo', 0) - messages = [ConsumerRecord(tp.topic, tp.partition, i, - None, None, 'key', 'value', 'checksum', 0, 0) - for i in range(batch_start, batch_end)] - records = Fetcher.PartitionRecords(fetch_offset, None, messages) - assert len(records) > 0 - msgs = records.take(1) - assert msgs[0].offset == 123 - assert records.fetch_offset == 124 - msgs = records.take(2) - assert len(msgs) == 2 - assert len(records) > 0 - records.discard() - assert len(records) == 0 - - def test_fetched_records(fetcher, topic, mocker): fetcher.config['check_crcs'] = False tp = TopicPartition(topic, 0) |