summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDana Powers <dana.powers@gmail.com>2015-03-29 16:32:12 -0700
committerDana Powers <dana.powers@gmail.com>2015-03-29 16:32:12 -0700
commitf35995a002749a371f03b18a8bff347b35ee9348 (patch)
treed9c1ab3b5c746f29b5a87760323aabcbea55e37a /test
parent9a8cd154fd952138b6becc5dd270abdbc957f35d (diff)
parentfb118fb75c818a32d0bb81fe725faca0a714b580 (diff)
downloadkafka-python-f35995a002749a371f03b18a8bff347b35ee9348.tar.gz
Merge pull request #336 from scrapinghub/feature-mp-consumer-params
Using additional params for MP consumer child process
Diffstat (limited to 'test')
-rw-r--r--test/test_consumer_integration.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py
index 9c89190..d3df56a 100644
--- a/test/test_consumer_integration.py
+++ b/test/test_consumer_integration.py
@@ -61,7 +61,7 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
group = kwargs.pop('group', self.id().encode('utf-8'))
topic = kwargs.pop('topic', self.topic)
- if consumer_class == SimpleConsumer:
+ if consumer_class in [SimpleConsumer, MultiProcessConsumer]:
kwargs.setdefault('iter_timeout', 0)
return consumer_class(self.client, group, topic, **kwargs)
@@ -243,7 +243,8 @@ class TestConsumerIntegration(KafkaIntegrationTestCase):
self.send_messages(0, range(0, 10))
self.send_messages(1, range(10, 20))
- consumer = MultiProcessConsumer(self.client, "group1", self.topic, auto_commit=False)
+ consumer = MultiProcessConsumer(self.client, "group1", self.topic,
+ auto_commit=False, iter_timeout=0)
self.assertEqual(consumer.pending(), 20)
self.assertEqual(consumer.pending(partitions=[0]), 10)