From ecf928737b8adfeff05329780016c735608e6ce0 Mon Sep 17 00:00:00 2001 From: Yatsishin Ilya <2159081+qoega@users.noreply.github.com> Date: Fri, 19 Feb 2021 18:08:38 +0300 Subject: [PATCH] fix --- tests/integration/helpers/cluster.py | 2 +- tests/integration/helpers/hdfs_api.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index bc9850d5176..88169425856 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -867,7 +867,7 @@ class ClickHouseCluster: os.makedirs(self.hdfs_kerberized_logs_dir) run_and_check(self.base_kerberized_hdfs_cmd + common_opts) hdfs_api = self.make_hdfs_api(kerberized=True) - self.wait_hdfs_to_start(hdfs_api, timeout=30) + self.wait_hdfs_to_start(hdfs_api, timeout=300) if self.with_mongo and self.base_mongo_cmd: logging.debug('Setup Mongo') diff --git a/tests/integration/helpers/hdfs_api.py b/tests/integration/helpers/hdfs_api.py index 60b8979fce2..9bd4bf66f92 100644 --- a/tests/integration/helpers/hdfs_api.py +++ b/tests/integration/helpers/hdfs_api.py @@ -116,7 +116,8 @@ class HDFSApi(object): return response_data.content def write_data(self, path, content): - logging.debug("write_data protocol:{} host:{} port:{} path: {} user:{}".format(self.protocol, self.host, self.proxy_port, path, self.user)) + logging.debug("write_data protocol:{} host:{} port:{} path: {} user:{}, principal:{}".format( + self.protocol, self.host, self.proxy_port, path, self.user, self.principal)) named_file = NamedTemporaryFile(mode='wb+') fpath = named_file.name if isinstance(content, str): @@ -126,7 +127,9 @@ class HDFSApi(object): if self.kerberized: self._run_kinit() - self.kerberos_auth = reqkerb.HTTPKerberosAuth(mutual_authentication=reqkerb.DISABLED, hostname_override=self.host, principal=self.principal) + self.kerberos_auth = reqkerb.HTTPKerberosAuth(mutual_authentication=reqkerb.DISABLED, + hostname_override="kerberizedhdfs1", + principal=self.principal) response = requests.put( "{protocol}://{host}:{port}/webhdfs/v1{path}?op=CREATE".format(protocol=self.protocol, host='localhost',