Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust consumer test error codes and timeouts
  • Loading branch information
edenhill committed Apr 29, 2016
commit b520c8d92e8f371a5cc85d3a2bb27dd12a62309f
3 changes: 2 additions & 1 deletion tests/test_Consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def dummy_commit_cb (consumer, err, partitions):
pass

kc = Consumer({'group.id':'test', 'socket.timeout.ms':'100',
'session.timeout.ms': 1000, # Avoid close() blocking too long
'on_commit': dummy_commit_cb})

kc.subscribe(["test"])
Expand Down Expand Up @@ -45,7 +46,7 @@ def dummy_assign_revoke (consumer, partitions):
try:
kc.commit(async=False)
except KafkaException as e:
assert e.args[0].code() in (KafkaError._TIMED_OUT, KafkaError._WAIT_COORD)
assert e.args[0].code() in (KafkaError._TIMED_OUT, KafkaError._NO_OFFSET)

# Get current position, should all be invalid.
kc.position(partitions)
Expand Down