summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Brown <browne@vmware.com>2016-02-22 22:15:18 -0800
committerEric Brown <browne@vmware.com>2016-02-23 09:18:13 -0800
commit5fd3b1509b8c8e9e244d204b3fb35dd0bc30df9f (patch)
tree96306be634329496ec5e459495748c266b55fe83
parent92c4f76c797f121bec11e53e7895909807d9ba1d (diff)
downloadoslo-messaging-5fd3b1509b8c8e9e244d204b3fb35dd0bc30df9f.tar.gz
Typos of 'recieve' instead of 'receive'
* i before e unless before c * Also updated the docstring on consume function Change-Id: Icfe35fc577d01434839d6774d02b933fc4cd1a08
-rw-r--r--oslo_messaging/_drivers/impl_kafka.py6
-rw-r--r--oslo_messaging/tests/drivers/test_impl_kafka.py6
2 files changed, 5 insertions, 7 deletions
diff --git a/oslo_messaging/_drivers/impl_kafka.py b/oslo_messaging/_drivers/impl_kafka.py
index 62d74e8..ebafb33 100644
--- a/oslo_messaging/_drivers/impl_kafka.py
+++ b/oslo_messaging/_drivers/impl_kafka.py
@@ -144,11 +144,9 @@ class Connection(object):
self.producer.send_messages(topic, message)
def consume(self, timeout=None):
- """recieve messages as many as max_fetch_messages.
+ """Receive up to 'max_fetch_messages' messages.
- In this functions, there are no while loop to subscribe.
- This would be helpful when we wants to control the velocity of
- subscription.
+ :param timeout: poll timeout in seconds
"""
duration = (self.consumer_timeout if timeout is None else timeout)
timer = driver_common.DecayingTimer(duration=duration)
diff --git a/oslo_messaging/tests/drivers/test_impl_kafka.py b/oslo_messaging/tests/drivers/test_impl_kafka.py
index bf18579..0a6907e 100644
--- a/oslo_messaging/tests/drivers/test_impl_kafka.py
+++ b/oslo_messaging/tests/drivers/test_impl_kafka.py
@@ -238,7 +238,7 @@ class TestWithRealKafkaBroker(test_utils.BaseTestCase):
@unittest.skipUnless(
_is_kafka_service_running(), "Kafka service is not available")
- def test_send_and_recieve_message(self):
+ def test_send_and_receive_message(self):
target = oslo_messaging.Target(
topic="fake_topic", exchange='fake_exchange')
targets_and_priorities = [(target, 'fake_info')]
@@ -256,7 +256,7 @@ class TestWithRealKafkaBroker(test_utils.BaseTestCase):
@unittest.skipUnless(
_is_kafka_service_running(), "Kafka service is not available")
- def test_send_and_recieve_message_without_exchange(self):
+ def test_send_and_receive_message_without_exchange(self):
target = oslo_messaging.Target(topic="fake_no_exchange_topic")
targets_and_priorities = [(target, 'fake_info')]
@@ -273,7 +273,7 @@ class TestWithRealKafkaBroker(test_utils.BaseTestCase):
@unittest.skipUnless(
_is_kafka_service_running(), "Kafka service is not available")
- def test_recieve_message_from_empty_topic_with_timeout(self):
+ def test_receive_message_from_empty_topic_with_timeout(self):
target = oslo_messaging.Target(
topic="fake_empty_topic", exchange='fake_empty_exchange')
targets_and_priorities = [(target, 'fake_info')]