kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: HOTFIX: In Connect test with auto topic creation disabled, ensure precreated topic is always used
Date Mon, 22 May 2017 01:05:13 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.11.0 55330cc29 -> a144c5277


HOTFIX: In Connect test with auto topic creation disabled, ensure precreated topic is always
used

Author: Ewen Cheslack-Postava <me@ewencp.org>

Reviewers: Jason Gustafson <jason@confluent.io>

Closes #3112 from ewencp/hotfix-precreate-topic

(cherry picked from commit d190d89dbc3df90e00f5e3c55507f67c5818504e)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>


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

Branch: refs/heads/0.11.0
Commit: a144c5277dd95d8862ea6d9a497e5a087aa491fe
Parents: 55330cc
Author: Ewen Cheslack-Postava <me@ewencp.org>
Authored: Sun May 21 18:04:32 2017 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Sun May 21 18:05:08 2017 -0700

----------------------------------------------------------------------
 .../tests/connect/connect_distributed_test.py       | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a144c527/tests/kafkatest/tests/connect/connect_distributed_test.py
----------------------------------------------------------------------
diff --git a/tests/kafkatest/tests/connect/connect_distributed_test.py b/tests/kafkatest/tests/connect/connect_distributed_test.py
index 8fbc13b..5c7793a 100644
--- a/tests/kafkatest/tests/connect/connect_distributed_test.py
+++ b/tests/kafkatest/tests/connect/connect_distributed_test.py
@@ -67,7 +67,7 @@ class ConnectDistributedTest(Test):
         self.num_zk = 1
         self.num_brokers = 1
         self.topics = {
-            'test' : { 'partitions': 1, 'replication-factor': 1 }
+            self.TOPIC: {'partitions': 1, 'replication-factor': 1}
         }
 
         self.zk = ZookeeperService(test_context, self.num_zk)
@@ -75,7 +75,7 @@ class ConnectDistributedTest(Test):
         self.key_converter = "org.apache.kafka.connect.json.JsonConverter"
         self.value_converter = "org.apache.kafka.connect.json.JsonConverter"
         self.schemas = True
-        self.broker_config_overrides = [["auto.create.topics.enable","false"]]
+        self.broker_config_overrides = [["auto.create.topics.enable", "false"]]
 
     def setup_services(self, security_protocol=SecurityConfig.PLAINTEXT, timestamp_type=None):
         self.kafka = KafkaService(self.test_context, self.num_brokers, self.zk,
@@ -205,7 +205,7 @@ class ConnectDistributedTest(Test):
         self.cc.set_configs(lambda node: self.render("connect-distributed.properties", node=node))
         self.cc.start()
 
-        self.source = VerifiableSource(self.cc)
+        self.source = VerifiableSource(self.cc, topic=self.TOPIC)
         self.source.start()
 
         wait_until(lambda: self.is_running(self.source), timeout_sec=30,
@@ -245,13 +245,13 @@ class ConnectDistributedTest(Test):
         self.cc.start()
 
         # use the verifiable source to produce a steady stream of messages
-        self.source = VerifiableSource(self.cc)
+        self.source = VerifiableSource(self.cc, topic=self.TOPIC)
         self.source.start()
 
         wait_until(lambda: len(self.source.committed_messages()) > 0, timeout_sec=30,
                    err_msg="Timeout expired waiting for source task to produce a message")
 
-        self.sink = VerifiableSink(self.cc)
+        self.sink = VerifiableSink(self.cc, topics=[self.TOPIC])
         self.sink.start()
 
         wait_until(lambda: self.is_running(self.sink), timeout_sec=30,
@@ -289,7 +289,7 @@ class ConnectDistributedTest(Test):
         self.cc.set_configs(lambda node: self.render("connect-distributed.properties", node=node))
         self.cc.start()
 
-        self.source = VerifiableSource(self.cc)
+        self.source = VerifiableSource(self.cc, topic=self.TOPIC)
         self.source.start()
 
         wait_until(lambda: self.is_running(self.source), timeout_sec=30,
@@ -351,9 +351,9 @@ class ConnectDistributedTest(Test):
         self.cc.set_configs(lambda node: self.render("connect-distributed.properties", node=node))
         self.cc.start()
 
-        self.source = VerifiableSource(self.cc, tasks=num_tasks, throughput=100)
+        self.source = VerifiableSource(self.cc, topic=self.TOPIC, tasks=num_tasks, throughput=100)
         self.source.start()
-        self.sink = VerifiableSink(self.cc, tasks=num_tasks)
+        self.sink = VerifiableSink(self.cc, tasks=num_tasks, topics=[self.TOPIC])
         self.sink.start()
 
         for _ in range(3):


Mime
View raw message