You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2015/12/01 20:48:20 UTC

kafka git commit: KAFKA-2915: Fix problem with System Tests that use bootstrap.servers embedded in jinja files

Repository: kafka
Updated Branches:
  refs/heads/trunk fb6ea6b17 -> 0264127ba


KAFKA-2915: Fix problem with System Tests that use bootstrap.servers embedded in jinja files

Fixes problems in mirror maker and consumer tests
http://jenkins.confluent.io/job/kafka_system_tests_branch_builder/290/
http://jenkins.confluent.io/job/kafka_system_tests_branch_builder/289/

Author: Ben Stopford <be...@gmail.com>

Reviewers: Guozhang Wang

Closes #608 from benstopford/KAFKA-2915-jinja-bug


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/0264127b
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/0264127b
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/0264127b

Branch: refs/heads/trunk
Commit: 0264127ba829adae0f1f1e7f610d2356fbcf17f3
Parents: fb6ea6b
Author: Ben Stopford <be...@gmail.com>
Authored: Tue Dec 1 11:48:16 2015 -0800
Committer: Guozhang Wang <wa...@gmail.com>
Committed: Tue Dec 1 11:48:16 2015 -0800

----------------------------------------------------------------------
 .../services/templates/mirror_maker_consumer.properties          | 2 +-
 .../services/templates/mirror_maker_producer.properties          | 4 ++--
 tests/kafkatest/services/verifiable_consumer.py                  | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/0264127b/tests/kafkatest/services/templates/mirror_maker_consumer.properties
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/templates/mirror_maker_consumer.properties b/tests/kafkatest/services/templates/mirror_maker_consumer.properties
index ff275a9..68641ab 100644
--- a/tests/kafkatest/services/templates/mirror_maker_consumer.properties
+++ b/tests/kafkatest/services/templates/mirror_maker_consumer.properties
@@ -15,7 +15,7 @@
 # see kafka.consumer.ConsumerConfig for more details
 
 {% if new_consumer %}
-bootstrap.servers={{ source.bootstrap_servers() }}
+bootstrap.servers={{ source.bootstrap_servers(security_config.security_protocol) }}
 {% else %}
 zookeeper.connect={{ source.zk.connect_setting() }}
 zookeeper.connection.timeout.ms={{ zookeeper_connection_timeout_ms|default(6000) }}

http://git-wip-us.apache.org/repos/asf/kafka/blob/0264127b/tests/kafkatest/services/templates/mirror_maker_producer.properties
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/templates/mirror_maker_producer.properties b/tests/kafkatest/services/templates/mirror_maker_producer.properties
index 371eecb..ff50b50 100644
--- a/tests/kafkatest/services/templates/mirror_maker_producer.properties
+++ b/tests/kafkatest/services/templates/mirror_maker_producer.properties
@@ -14,8 +14,8 @@
 # limitations under the License.
 # see kafka.producer.ProducerConfig for more details
 
-metadata.broker.list={{ target.bootstrap_servers() }}
-bootstrap.servers = {{ target.bootstrap_servers() }}
+metadata.broker.list={{ target.bootstrap_servers(security_config.security_protocol) }}
+bootstrap.servers = {{ target.bootstrap_servers(security_config.security_protocol) }}
 producer.type={{ producer_type|default("async") }}  # sync or async
 compression.codec=none
 serializer.class=kafka.serializer.DefaultEncoder

http://git-wip-us.apache.org/repos/asf/kafka/blob/0264127b/tests/kafkatest/services/verifiable_consumer.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/services/verifiable_consumer.py b/tests/kafkatest/services/verifiable_consumer.py
index 51013c0..338646b 100644
--- a/tests/kafkatest/services/verifiable_consumer.py
+++ b/tests/kafkatest/services/verifiable_consumer.py
@@ -223,10 +223,9 @@ class VerifiableConsumer(BackgroundThreadService):
         cmd += " export KAFKA_OPTS=%s;" % self.security_config.kafka_opts
         cmd += " export KAFKA_LOG4J_OPTS=\"-Dlog4j.configuration=file:%s\"; " % VerifiableConsumer.LOG4J_CONFIG
         cmd += "/opt/" + kafka_dir(node) + "/bin/kafka-run-class.sh org.apache.kafka.tools.VerifiableConsumer" \
-              " --group-id %s --topic %s --broker-list %s --session-timeout %s" % \
+              " --group-id %s --topic %s --broker-list %s --session-timeout %s %s" % \
               (self.group_id, self.topic, self.kafka.bootstrap_servers(self.security_config.security_protocol), self.session_timeout,
                "--enable-autocommit" if self.enable_autocommit else "")
-
         if self.max_messages > 0:
             cmd += " --max-messages %s" % str(self.max_messages)