summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaras Voinarovskiy <voyn1991@gmail.com>2017-07-30 20:27:10 +0000
committerTaras Voinarovskiy <voyn1991@gmail.com>2017-08-07 09:34:08 +0000
commitf244e527a9674fa22b0bf9771585598cb758c8b1 (patch)
tree079c8534c030c0f238761f3abf1d531b133a1e3a
parent39f0e50b9441609e9dce4e60a1ab2c3f16680476 (diff)
downloadkafka-python-f244e527a9674fa22b0bf9771585598cb758c8b1.tar.gz
Fix test for older brokers
-rw-r--r--test/test_consumer_integration.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py
index 218ed2c..2169145 100644
--- a/test/test_consumer_integration.py
+++ b/test/test_consumer_integration.py
@@ -11,7 +11,9 @@ from kafka import (
create_gzip_message, KafkaProducer
)
from kafka.consumer.base import MAX_FETCH_BUFFER_SIZE_BYTES
-from kafka.errors import ConsumerFetchSizeTooSmall, OffsetOutOfRangeError
+from kafka.errors import (
+ ConsumerFetchSizeTooSmall, OffsetOutOfRangeError, UnsupportedVersionError
+)
from kafka.structs import ProduceRequestPayload, TopicPartition
from test.fixtures import ZookeeperFixture, KafkaFixture
@@ -666,5 +668,5 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
consumer = self.kafka_consumer()
tp = TopicPartition(self.topic, 0)
- with self.assertRaises():
+ with self.assertRaises(UnsupportedVersionError):
consumer.offsets_for_times({tp: int(time.time())})