Skip to content

Commit 84a7add

Browse files
author
Mark Roberts
committed
Fix the multiprocessing tests for python 3
1 parent e889c8a commit 84a7add

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

kafka/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def __init__(self, client, group, topic, auto_commit=True,
591591
for chunk in chunks:
592592
chunk = filter(lambda x: x is not None, chunk)
593593
args = (client.copy(),
594-
group, topic, chunk,
594+
group, topic, list(chunk),
595595
self.queue, self.start, self.exit,
596596
self.pause, self.size)
597597

test/test_consumer_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def test_multi_process_consumer_blocking(self):
151151
with Timer() as t:
152152
messages = consumer.get_messages(count=10, block=True, timeout=5)
153153
self.assert_message_count(messages, 5)
154-
self.assertGreaterEqual(t.interval, 5)
154+
self.assertGreaterEqual(t.interval, 4.95)
155155

156156
consumer.stop()
157157

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ deps =
99
mock
1010
python-snappy
1111
commands =
12-
nosetests {posargs:-v --with-id --with-timer --timer-top-n 10 --with-coverage --cover-erase --cover-package kafka}
12+
nosetests {posargs:-v --with-id --id-file={envdir}/.noseids --with-timer --timer-top-n 10 --with-coverage --cover-erase --cover-package kafka}
1313
setenv =
1414
PROJECT_ROOT = {toxinidir}
1515

0 commit comments

Comments
 (0)