diff options
author | Dana Powers <dana.powers@gmail.com> | 2014-08-22 10:59:31 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2014-08-22 10:59:31 -0700 |
commit | c3df8a02150da4be7b45977b9145d6bf5bf8edf4 (patch) | |
tree | bd06fec3a6e886e2445bb6573c3c9ed67cf21cd5 /test/test_client_integration.py | |
parent | f8618336979fd2704d14695750b6a240b3922d40 (diff) | |
parent | 18fdddf37f552cef72bd7714c1aacc8a35a5f190 (diff) | |
download | kafka-python-c3df8a02150da4be7b45977b9145d6bf5bf8edf4.tar.gz |
Merge pull request #194 from dpkp/kafka_timeout_error
Add KafkaTimeoutError and fix client.ensure_topic_exists
Diffstat (limited to 'test/test_client_integration.py')
-rw-r--r-- | test/test_client_integration.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_client_integration.py b/test/test_client_integration.py index 49c4b57..98f2473 100644 --- a/test/test_client_integration.py +++ b/test/test_client_integration.py @@ -49,6 +49,17 @@ class TestKafkaClientIntegration(KafkaIntegrationTestCase): messages = list(fetch_resp.messages) self.assertEquals(len(messages), 0) + @kafka_versions("all") + def test_ensure_topic_exists(self): + + # assume that self.topic was created by setUp + # if so, this should succeed + self.client.ensure_topic_exists(self.topic, timeout=1) + + # ensure_topic_exists should fail with KafkaTimeoutError + with self.assertRaises(KafkaTimeoutError): + self.client.ensure_topic_exists("this_topic_doesnt_exist", timeout=0) + #################### # Offset Tests # #################### |