From 707906263d59d0ff1924ece977e98a82e7d452b3 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sat, 17 Jun 2017 08:47:44 -0700 Subject: Do not test fetched_size with fetch_max_bytes since 0.11 brokers will return more data than 0.10 --- test/test_consumer_integration.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py index 3c5fbd7..ec00738 100644 --- a/test/test_consumer_integration.py +++ b/test/test_consumer_integration.py @@ -588,20 +588,17 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): # Start a consumer consumer = self.kafka_consumer( auto_offset_reset='earliest', fetch_max_bytes=300) - fetched_size = 0 seen_partitions = set([]) for i in range(10): poll_res = consumer.poll(timeout_ms=100) for partition, msgs in six.iteritems(poll_res): for msg in msgs: - fetched_size += len(msg.value) seen_partitions.add(partition) # Check that we fetched at least 1 message from both partitions self.assertEqual( seen_partitions, set([ TopicPartition(self.topic, 0), TopicPartition(self.topic, 1)])) - self.assertLess(fetched_size, 3000) @kafka_versions('>=0.10.1') def test_kafka_consumer_max_bytes_one_msg(self): -- cgit v1.2.1