From 84a7add6da7d1e319c03e0f9758e15e8680c6c69 Mon Sep 17 00:00:00 2001 From: Mark Roberts Date: Wed, 3 Sep 2014 11:46:39 -0700 Subject: [PATCH] Fix the multiprocessing tests for python 3 --- kafka/consumer.py | 2 +- test/test_consumer_integration.py | 2 +- 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() diff --git a/tox.ini b/tox.ini index 0c74cc7..4d8abc8 100644 --- a/tox.ini +++ b/tox.ini @@ -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}