From 79397ca6a1b0d453416f5bb719bb234a8ef589f1 Mon Sep 17 00:00:00 2001 From: Grigoriy Pisarenko Date: Wed, 25 Dec 2024 10:26:00 +0000 Subject: [PATCH 1/2] Fixed ampty issues from --- ydb/core/base/path.cpp | 2 +- ydb/core/testlib/test_client.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/core/base/path.cpp b/ydb/core/base/path.cpp index 4e7c91bc086b..50a243466bba 100644 --- a/ydb/core/base/path.cpp +++ b/ydb/core/base/path.cpp @@ -221,7 +221,7 @@ TString::const_iterator PathPartBrokenAt(const TString &part, const TStringBuf e bool CheckDbPath(const TString &path, const TString &domain, TString &error) { auto parts = SplitPath(path); - if (parts.empty()) { + if (parts.size() < 2) { error = "Database path cannot be empty or root"; return false; } diff --git a/ydb/core/testlib/test_client.cpp b/ydb/core/testlib/test_client.cpp index 35ca6445af40..e21acb93314c 100644 --- a/ydb/core/testlib/test_client.cpp +++ b/ydb/core/testlib/test_client.cpp @@ -2768,7 +2768,7 @@ namespace Tests { if (result.operation().status() != Ydb::StatusIds::SUCCESS) { NYql::TIssues issues; NYql::IssuesFromMessage(result.operation().issues(), issues); - ythrow yexception() << "Failed to create tenant " << path << ", " << result.operation().status() << ", reason:\n" << issues.ToString(); + ythrow yexception() << "Failed to create tenant " << path << ", " << result.operation().status() << ", reason:\n" << result.DebugString(); } // Run new tenant From 3b49df73ea8c839ce68ea3b90a21d50b6c55d6ca Mon Sep 17 00:00:00 2001 From: Grigoriy Pisarenko Date: Wed, 25 Dec 2024 10:36:16 +0000 Subject: [PATCH 2/2] Removed changes in test client --- ydb/core/testlib/test_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ydb/core/testlib/test_client.cpp b/ydb/core/testlib/test_client.cpp index e21acb93314c..35ca6445af40 100644 --- a/ydb/core/testlib/test_client.cpp +++ b/ydb/core/testlib/test_client.cpp @@ -2768,7 +2768,7 @@ namespace Tests { if (result.operation().status() != Ydb::StatusIds::SUCCESS) { NYql::TIssues issues; NYql::IssuesFromMessage(result.operation().issues(), issues); - ythrow yexception() << "Failed to create tenant " << path << ", " << result.operation().status() << ", reason:\n" << result.DebugString(); + ythrow yexception() << "Failed to create tenant " << path << ", " << result.operation().status() << ", reason:\n" << issues.ToString(); } // Run new tenant