Fix the multiprocessing tests for python 3
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
2
tox.ini
2
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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user