Skip to content

Commit 26a8102

Browse files
committed
Do not test fetched_size with fetch_max_bytes since 0.11 brokers will return more data than 0.10
1 parent c5f1c69 commit 26a8102

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

test/test_consumer_integration.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,20 +588,17 @@ def test_kafka_consumer_max_bytes_simple(self):
588588
# Start a consumer
589589
consumer = self.kafka_consumer(
590590
auto_offset_reset='earliest', fetch_max_bytes=300)
591-
fetched_size = 0
592591
seen_partitions = set([])
593592
for i in range(10):
594593
poll_res = consumer.poll(timeout_ms=100)
595594
for partition, msgs in six.iteritems(poll_res):
596595
for msg in msgs:
597-
fetched_size += len(msg.value)
598596
seen_partitions.add(partition)
599597

600598
# Check that we fetched at least 1 message from both partitions
601599
self.assertEqual(
602600
seen_partitions, set([
603601
TopicPartition(self.topic, 0), TopicPartition(self.topic, 1)]))
604-
self.assertLess(fetched_size, 3000)
605602

606603
@kafka_versions('>=0.10.1')
607604
def test_kafka_consumer_max_bytes_one_msg(self):

0 commit comments

Comments
 (0)