summaryrefslogtreecommitdiff
path: root/test/test_consumer_integration.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_consumer_integration.py')
-rw-r--r--test/test_consumer_integration.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py
index df2eeea..52b3e85 100644
--- a/test/test_consumer_integration.py
+++ b/test/test_consumer_integration.py
@@ -164,6 +164,20 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
consumer.seek(-13, 2)
self.assert_message_count([ message for message in consumer ], 13)
+ # Set absolute offset
+ consumer.seek(100)
+ self.assert_message_count([ message for message in consumer ], 0)
+ consumer.seek(100, partition=0)
+ self.assert_message_count([ message for message in consumer ], 0)
+ consumer.seek(101, partition=1)
+ self.assert_message_count([ message for message in consumer ], 0)
+ consumer.seek(90, partition=0)
+ self.assert_message_count([ message for message in consumer ], 10)
+ consumer.seek(20, partition=1)
+ self.assert_message_count([ message for message in consumer ], 80)
+ consumer.seek(0, partition=1)
+ self.assert_message_count([ message for message in consumer ], 100)
+
consumer.stop()
@kafka_versions("all")