diff options
author | Mark Roberts <wizzat@fb.com> | 2014-09-03 11:46:39 -0700 |
---|---|---|
committer | Mark Roberts <wizzat@fb.com> | 2014-09-03 11:46:39 -0700 |
commit | 84a7add6da7d1e319c03e0f9758e15e8680c6c69 (patch) | |
tree | d37c27965820e8d01497ee9f4a6159df6ef7ed8a | |
parent | e889c8aef01e9a0b0fc55c433314041ad3dccb2a (diff) | |
download | kafka-python-84a7add6da7d1e319c03e0f9758e15e8680c6c69.tar.gz |
Fix the multiprocessing tests for python 3
-rw-r--r-- | kafka/consumer.py | 2 | ||||
-rw-r--r-- | test/test_consumer_integration.py | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/kafka/consumer.py b/kafka/consumer.py index d811147..1c122ce 100644 --- a/kafka/consumer.py +++ b/kafka/consumer.py @@ -591,7 +591,7 @@ class MultiProcessConsumer(Consumer): for chunk in chunks: chunk = filter(lambda x: x is not None, chunk) args = (client.copy(), - group, topic, chunk, + group, topic, list(chunk), self.queue, self.start, self.exit, self.pause, self.size) diff --git a/test/test_consumer_integration.py b/test/test_consumer_integration.py index 1b2c73e..3dfded9 100644 --- a/test/test_consumer_integration.py +++ b/test/test_consumer_integration.py @@ -151,7 +151,7 @@ class TestConsumerIntegration(KafkaIntegrationTestCase): with Timer() as t: messages = consumer.get_messages(count=10, block=True, timeout=5) self.assert_message_count(messages, 5) - self.assertGreaterEqual(t.interval, 5) + self.assertGreaterEqual(t.interval, 4.95) consumer.stop() @@ -9,7 +9,7 @@ deps = mock python-snappy commands = - nosetests {posargs:-v --with-id --with-timer --timer-top-n 10 --with-coverage --cover-erase --cover-package kafka} + nosetests {posargs:-v --with-id --id-file={envdir}/.noseids --with-timer --timer-top-n 10 --with-coverage --cover-erase --cover-package kafka} setenv = PROJECT_ROOT = {toxinidir} |