summaryrefslogtreecommitdiff
path: root/test/test_consumer_integration.py
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2019-09-30 13:16:40 -0700
committerGitHub <noreply@github.com>2019-09-30 13:16:40 -0700
commit0a8884b984b37a8b46e5b17eabaee894113d7b59 (patch)
tree964aa5bef99d66270b5b7379f270bce9f843bdc8 /test/test_consumer_integration.py
parent975087b4ae22ecdb63b757a5abe2e9643888b7fe (diff)
downloadkafka-python-0a8884b984b37a8b46e5b17eabaee894113d7b59.tar.gz
Add KAFKA 2.3.0 to test matrix (#1915)
Diffstat (limited to 'test/test_consumer_integration.py')
-rw-r--r--test/test_consumer_integration.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py
index a2b8f70..d6fd41c 100644
--- a/test/test_consumer_integration.py
+++ b/test/test_consumer_integration.py
@@ -17,6 +17,7 @@ from kafka.errors import (
ConsumerFetchSizeTooSmall, OffsetOutOfRangeError, UnsupportedVersionError,
KafkaTimeoutError, UnsupportedCodecError
)
+from kafka.protocol.message import PartialMessage
from kafka.structs import (
ProduceRequestPayload, TopicPartition, OffsetAndTimestamp
)
@@ -249,6 +250,8 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
consumer.stop()
+ @pytest.mark.skipif(env_kafka_version() >= (2, 0),
+ reason="SimpleConsumer blocking does not handle PartialMessage change in kafka 2.0+")
def test_simple_consumer_blocking(self):
consumer = self.consumer()
@@ -414,7 +417,8 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
consumer = self.consumer(max_buffer_size=60000)
expected_messages = set(small_messages + large_messages)
- actual_messages = set([ x.message.value for x in consumer ])
+ actual_messages = set([x.message.value for x in consumer
+ if not isinstance(x.message, PartialMessage)])
self.assertEqual(expected_messages, actual_messages)
consumer.stop()