Fix HDFSCommon and test_storage_kerberized_hdfs to make running integration tests

This commit is contained in:
Roman Vasin 2022-06-07 12:06:22 +03:00
parent 323835f51d
commit cb53aa15ec
2 changed files with 2 additions and 4 deletions

View File

@ -121,9 +121,7 @@ void HDFSBuilderWrapper::runKinit()
try {
k_init.init(hadoop_kerberos_keytab,hadoop_kerberos_principal,hadoop_security_kerberos_ticket_cache_path);
} catch (const DB::Exception & e) {
String msg = "KerberosInit failure: " + DB::getExceptionMessage(e, false);
LOG_DEBUG(&Poco::Logger::get("HDFSClient"), "ADQM: {}",msg);
throw Exception(0, msg);
throw Exception("KerberosInit failure: "+ DB::getExceptionMessage(e, false), ErrorCodes::BAD_ARGUMENTS);
}
LOG_DEBUG(&Poco::Logger::get("HDFSClient"), "ADQM: finished KerberosInit");
}

View File

@ -113,7 +113,7 @@ def test_read_table_expired(started_cluster):
)
assert False, "Exception have to be thrown"
except Exception as ex:
assert "DB::Exception: kinit failure:" in str(ex)
assert "DB::Exception: KerberosInit failure:" in str(ex)
started_cluster.unpause_container("hdfskerberos")