Merge "[kafka] invoke TypeError exception when 'listen()' method of KafkaDriver is called"

This commit is contained in:
Jenkins 2016-08-31 08:51:26 +00:00 committed by Gerrit Code Review
commit d8c6bf7b7c
2 changed files with 3 additions and 2 deletions

View File

@ -347,7 +347,7 @@ class KafkaDriver(base.BaseDriver):
with self._get_connection(purpose=PURPOSE_SEND) as conn:
conn.notify_send(target_to_topic(target), ctxt, message, retry)
def listen(self, target):
def listen(self, target, batch_size, batch_timeout):
raise NotImplementedError(
'The RPC implementation for Kafka is not implemented')

View File

@ -108,7 +108,8 @@ class TestKafkaDriver(test_utils.BaseTestCase):
def test_listen(self):
target = oslo_messaging.Target(topic="topic_test")
self.assertRaises(NotImplementedError, self.driver.listen, target)
self.assertRaises(NotImplementedError, self.driver.listen, target,
None, None)
class TestKafkaConnection(test_utils.BaseTestCase):