From c8226d030a15e34538934bdaf5add090db118732 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sun, 3 Jan 2016 22:46:18 -0800 Subject: Dont use consumer_timeout_ms in kafka blocking test --- test/test_consumer_integration.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py index 1104916..8b5dbec 100644 --- a/test/test_consumer_integration.py +++ b/test/test_consumer_integration.py @@ -539,7 +539,6 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): enable_auto_commit=True, auto_commit_interval_ms=100, auto_offset_reset='earliest', - consumer_timeout_ms=100 ) # Grab the first 180 messages @@ -556,14 +555,12 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): enable_auto_commit=True, auto_commit_interval_ms=100, auto_offset_reset='earliest', - consumer_timeout_ms=100 ) # 181-200 output_msgs2 = [] - with self.assertRaises(StopIteration): - while True: - m = next(consumer2) - output_msgs2.append(m) + for _ in xrange(20): + m = next(consumer2) + output_msgs2.append(m) self.assert_message_count(output_msgs2, 20) - #self.assertEqual(len(set(output_msgs1) & set(output_msgs2)), 15) + self.assertEqual(len(set(output_msgs1) | set(output_msgs2)), 200) -- cgit v1.2.1