Browse Source

KAFKA-10225 Increase default zk timeout for system tests (#8974)

Increase ZK connection and session timeout in system tests to match the defaults.

Reviewers: Jun Rao <junrao@gmail.com>
pull/8703/head
Chia-Ping Tsai 4 years ago committed by GitHub
parent
commit
80cab851ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tests/kafkatest/services/kafka/config.py
  2. 1
      tests/kafkatest/services/kafka/config_property.py
  3. 8
      tests/kafkatest/services/kafka/kafka.py

3
tests/kafkatest/services/kafka/config.py

@ -25,7 +25,8 @@ class KafkaConfig(dict): @@ -25,7 +25,8 @@ class KafkaConfig(dict):
config_property.PORT: 9092,
config_property.SOCKET_RECEIVE_BUFFER_BYTES: 65536,
config_property.LOG_DIRS: "/mnt/kafka/kafka-data-logs-1,/mnt/kafka/kafka-data-logs-2",
config_property.ZOOKEEPER_CONNECTION_TIMEOUT_MS: 2000
config_property.ZOOKEEPER_CONNECTION_TIMEOUT_MS: 18000,
config_property.ZOOKEEPER_SESSION_TIMEOUT_MS: 18000
}
def __init__(self, **kwargs):

1
tests/kafkatest/services/kafka/config_property.py

@ -42,6 +42,7 @@ ZOOKEEPER_CONNECT = "zookeeper.connect" @@ -42,6 +42,7 @@ ZOOKEEPER_CONNECT = "zookeeper.connect"
ZOOKEEPER_SSL_CLIENT_ENABLE = "zookeeper.ssl.client.enable"
ZOOKEEPER_CLIENT_CNXN_SOCKET = "zookeeper.clientCnxnSocket"
ZOOKEEPER_CONNECTION_TIMEOUT_MS = "zookeeper.connection.timeout.ms"
ZOOKEEPER_SESSION_TIMEOUT_MS = "zookeeper.session.timeout.ms"
INTER_BROKER_PROTOCOL_VERSION = "inter.broker.protocol.version"
MESSAGE_FORMAT_VERSION = "log.message.format.version"
MESSAGE_TIMESTAMP_TYPE = "message.timestamp.type"

8
tests/kafkatest/services/kafka/kafka.py

@ -98,7 +98,7 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service): @@ -98,7 +98,7 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
interbroker_security_protocol=SecurityConfig.PLAINTEXT,
client_sasl_mechanism=SecurityConfig.SASL_MECHANISM_GSSAPI, interbroker_sasl_mechanism=SecurityConfig.SASL_MECHANISM_GSSAPI,
authorizer_class_name=None, topics=None, version=DEV_BRANCH, jmx_object_names=None,
jmx_attributes=None, zk_connect_timeout=5000, zk_session_timeout=6000, server_prop_overides=None, zk_chroot=None,
jmx_attributes=None, zk_connect_timeout=18000, zk_session_timeout=18000, server_prop_overides=None, zk_chroot=None,
zk_client_secure=False,
listener_security_config=ListenerSecurityConfig(), per_node_server_prop_overrides=None,
extra_kafka_opts="", tls_version=None):
@ -185,7 +185,11 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service): @@ -185,7 +185,11 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
for node in self.nodes:
node.version = version
node.config = KafkaConfig(**{config_property.BROKER_ID: self.idx(node)})
node.config = KafkaConfig(**{
config_property.BROKER_ID: self.idx(node),
config_property.ZOOKEEPER_CONNECTION_TIMEOUT_MS: zk_connect_timeout,
config_property.ZOOKEEPER_SESSION_TIMEOUT_MS: zk_session_timeout
})
def set_version(self, version):
for node in self.nodes:

Loading…
Cancel
Save