Skip to content

Commit

Permalink
Fixed unit tests 3
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed Dec 11, 2024
1 parent c69fa20 commit 119d503
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,4 @@ TAsyncStatus TExternalDataSourceManager::ExecuteSchemeRequest(const NKikimrSchem
});
}


} // namespace NKikimr::NKqp
6 changes: 3 additions & 3 deletions ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7481,22 +7481,22 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
CREATE RESOURCE POOL MyResourcePool WITH (
ANOTHER_LIMIT=20
);)").GetValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::GENERIC_ERROR);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
UNIT_ASSERT_STRING_CONTAINS(result.GetIssues().ToString(), "Unknown property: another_limit");

result = session.ExecuteSchemeQuery(R"(
ALTER RESOURCE POOL MyResourcePool
SET (ANOTHER_LIMIT = 5),
RESET (SOME_LIMIT);
)").GetValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::GENERIC_ERROR);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
UNIT_ASSERT_STRING_CONTAINS(result.GetIssues().ToString(), "Unknown property: another_limit, some_limit");

result = session.ExecuteSchemeQuery(R"(
CREATE RESOURCE POOL MyResourcePool WITH (
CONCURRENT_QUERY_LIMIT="StringValue"
);)").GetValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::GENERIC_ERROR);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::BAD_REQUEST);
UNIT_ASSERT_STRING_CONTAINS(result.GetIssues().ToString(), "Failed to parse property concurrent_query_limit:");

result = session.ExecuteSchemeQuery(TStringBuilder() << R"(
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/kqp/workload_service/ut/kqp_workload_service_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ Y_UNIT_TEST_SUITE(ResourcePoolsDdl) {
CREATE RESOURCE POOL )" << poolId << R"( WITH (
CONCURRENT_QUERY_LIMIT=0
);
)", EStatus::GENERIC_ERROR, "Cannot create default pool manually, pool will be created automatically during first request execution");
)", EStatus::PRECONDITION_FAILED, "Cannot create default pool manually, pool will be created automatically during first request execution");

// Create default pool
TSampleQueries::TSelect42::CheckResult(ydb->ExecuteQuery(TSampleQueries::TSelect42::Query, TQueryRunnerSettings().PoolId(poolId)));
Expand All @@ -489,7 +489,7 @@ Y_UNIT_TEST_SUITE(ResourcePoolsDdl) {
ALTER RESOURCE POOL )" << poolId << R"( SET (
CONCURRENT_QUERY_LIMIT=0
);
)", EStatus::GENERIC_ERROR, "Can not change property concurrent_query_limit for default pool");
)", EStatus::PRECONDITION_FAILED, "Can not change property concurrent_query_limit for default pool");
}

Y_UNIT_TEST(TestAlterResourcePool) {
Expand Down

0 comments on commit 119d503

Please sign in to comment.