Skip to content

Commit 8983e73

Browse files
committed
Split up and speed up producer based integration tests
1 parent 7eaca8e commit 8983e73

File tree

4 files changed

+344
-72
lines changed

4 files changed

+344
-72
lines changed

kafka/consumer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def get_or_init_offset_callback(resp):
101101
elif resp.error == ErrorMapping.UNKNOWN_TOPIC_OR_PARTITON:
102102
return 0
103103
else:
104-
raise Exception("OffsetFetchRequest for topic=%s, "
104+
raise ProtocolError("OffsetFetchRequest for topic=%s, "
105105
"partition=%d failed with errorcode=%s" % (
106106
resp.topic, resp.partition, resp.error))
107107

kafka/partitioner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,5 @@ class HashedPartitioner(Partitioner):
5454
def partition(self, key, partitions):
5555
size = len(partitions)
5656
idx = hash(key) % size
57+
5758
return partitions[idx]

0 commit comments

Comments
 (0)