You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mj...@apache.org on 2018/03/16 22:30:41 UTC
[kafka] branch trunk updated: Allow users to specify
'if-not-exists' when creating topics while testing (#4715)
This is an automated email from the ASF dual-hosted git repository.
mjsax pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new b6ae51b Allow users to specify 'if-not-exists' when creating topics while testing (#4715)
b6ae51b is described below
commit b6ae51b108d48a1ac5e5721cd4c3b54ed845e040
Author: Chris Egerton <ce...@oberlin.edu>
AuthorDate: Fri Mar 16 15:30:38 2018 -0700
Allow users to specify 'if-not-exists' when creating topics while testing (#4715)
Author: Chris Egerton <ch...@confluent.io>
---
tests/kafkatest/services/kafka/kafka.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/kafkatest/services/kafka/kafka.py b/tests/kafkatest/services/kafka/kafka.py
index 4a35e3f..e563ab8 100644
--- a/tests/kafkatest/services/kafka/kafka.py
+++ b/tests/kafkatest/services/kafka/kafka.py
@@ -311,6 +311,9 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
'replication-factor': topic_cfg.get('replication-factor', 1)
}
+ if topic_cfg.get('if-not-exists', False):
+ cmd += ' --if-not-exists'
+
if "configs" in topic_cfg.keys() and topic_cfg["configs"] is not None:
for config_name, config_value in topic_cfg["configs"].items():
cmd += " --config %s=%s" % (config_name, str(config_value))
--
To stop receiving notification emails like this one, please contact
mjsax@apache.org.