This is an automated email from the ASF dual-hosted git repository.
jgus 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 d31c9db MINOR: Use producer template in verifiable producer service
(#5581)
d31c9db is described below
commit d31c9db4afb300aa53e0a663083f2cfd3a31c537
Author: Stanislav Kozlovski <[email protected]>
AuthorDate: Thu Aug 30 18:49:01 2018 +0300
MINOR: Use producer template in verifiable producer service (#5581)
Also remove an unused old consumer template.
Reviewers: Jason Gustafson <[email protected]>
---
.../services/templates/consumer.properties | 23 ----------------------
.../services/templates/producer.properties | 2 +-
tests/kafkatest/services/verifiable_producer.py | 4 ++--
3 files changed, 3 insertions(+), 26 deletions(-)
diff --git a/tests/kafkatest/services/templates/consumer.properties
b/tests/kafkatest/services/templates/consumer.properties
deleted file mode 100644
index b8723d1..0000000
--- a/tests/kafkatest/services/templates/consumer.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# see kafka.consumer.ConsumerConfig for more details
-
-zookeeper.connect={{ zookeeper_connect }}
-zookeeper.connection.timeout.ms={{
zookeeper_connection_timeout_ms|default(6000) }}
-group.id={{ group_id|default('test-consumer-group') }}
-
-{% if consumer_timeout_ms is defined and consumer_timeout_ms is not none %}
-consumer.timeout.ms={{ consumer_timeout_ms }}
-{% endif %}
diff --git a/tests/kafkatest/services/templates/producer.properties
b/tests/kafkatest/services/templates/producer.properties
index 65a4880..c41a0ea 100644
--- a/tests/kafkatest/services/templates/producer.properties
+++ b/tests/kafkatest/services/templates/producer.properties
@@ -14,4 +14,4 @@
# limitations under the License.
# see kafka.producer.ProducerConfig for more details
-bootstrap.servers = {{ broker_list }}
+request.timeout.ms={{ request_timeout_ms }}
diff --git a/tests/kafkatest/services/verifiable_producer.py
b/tests/kafkatest/services/verifiable_producer.py
index e695048..7fa2654 100644
--- a/tests/kafkatest/services/verifiable_producer.py
+++ b/tests/kafkatest/services/verifiable_producer.py
@@ -103,7 +103,8 @@ class VerifiableProducer(KafkaPathResolverMixin,
VerifiableClientMixin, Backgrou
def prop_file(self, node):
idx = self.idx(node)
- prop_file = str(self.security_config)
+ prop_file = self.render('producer.properties',
request_timeout_ms=(self.request_timeout_sec * 1000))
+ prop_file += "\n{}".format(str(self.security_config))
if self.compression_types is not None:
compression_index = idx - 1
self.logger.info("VerifiableProducer (index = %d) will use
compression type = %s", idx,
@@ -129,7 +130,6 @@ class VerifiableProducer(KafkaPathResolverMixin,
VerifiableClientMixin, Backgrou
self.logger.info("VerifiableProducer (index = %d) will use acks =
%s", idx, self.acks)
producer_prop_file += "\nacks=%s\n" % self.acks
- producer_prop_file += "\nrequest.timeout.ms=%d\n" %
(self.request_timeout_sec * 1000)
if self.enable_idempotence:
self.logger.info("Setting up an idempotent producer")
producer_prop_file += "\nmax.in.flight.requests.per.connection=5\n"