diff options
author | Dana Powers <dana.powers@rd.io> | 2016-01-03 22:46:18 -0800 |
---|---|---|
committer | Dana Powers <dana.powers@rd.io> | 2016-01-03 22:46:18 -0800 |
commit | c8226d030a15e34538934bdaf5add090db118732 (patch) | |
tree | 9aef838c0d41684e469b2e69d23230ad5c57a68d | |
parent | 09358f9c825a5d019a25288e0a4ea8b2dd0141b3 (diff) | |
download | kafka-python-c8226d030a15e34538934bdaf5add090db118732.tar.gz |
Dont use consumer_timeout_ms in kafka blocking test
-rw-r--r-- | test/test_consumer_integration.py | 11 |
1 files 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) |