diff options
author | gvit <gvit@ydb.tech> | 2023-12-06 14:05:19 +0300 |
---|---|---|
committer | gvit <gvit@ydb.tech> | 2023-12-06 15:11:27 +0300 |
commit | ea7e18c4f09c1ac195196b51e782a8f07f087006 (patch) | |
tree | 16ce57bcbf4c522f60eeffe4d0c63ae691eb0370 | |
parent | f220da01db9669f73628efbac9b92c9e79b5bd63 (diff) | |
download | ydb-ea7e18c4f09c1ac195196b51e782a8f07f087006.tar.gz |
Change "kqp_service_ut.cpp" KIKIMR-20405
-rw-r--r-- | ydb/core/kqp/ut/service/kqp_service_ut.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/ydb/core/kqp/ut/service/kqp_service_ut.cpp b/ydb/core/kqp/ut/service/kqp_service_ut.cpp index 58a1e760930..f2b0157cca1 100644 --- a/ydb/core/kqp/ut/service/kqp_service_ut.cpp +++ b/ydb/core/kqp/ut/service/kqp_service_ut.cpp @@ -1,5 +1,6 @@ #include <ydb/core/kqp/counters/kqp_counters.h> #include <ydb/core/kqp/ut/common/kqp_ut_common.h> +#include <ydb/core/base/counters.h> #include <library/cpp/threading/local_executor/local_executor.h> @@ -95,10 +96,24 @@ Y_UNIT_TEST_SUITE(KqpService) { } Cerr << "finished sessions close....." << Endl; - auto counters = kikimr->GetTestServer().GetRuntime()->GetAppData(0).Counters; + auto counters = GetServiceCounters(kikimr->GetTestServer().GetRuntime()->GetAppData(0).Counters, "ydb"); + + ui64 pendingCompilations = 0; + do { + Sleep(WaitDuration); + pendingCompilations = counters->GetNamedCounter("name", "table.query.compilation.active_count", false)->Val(); + Cerr << "still compiling... " << pendingCompilations << Endl; + } while (pendingCompilations != 0); + + ui64 pendingSessions = 0; do { Sleep(WaitDuration); - } while (counters->GetNamedCounter("name", "table.query.compilation.active_count", false)->Val() != 0); + pendingSessions = counters->GetNamedCounter("name", "table.session.active_count", false)->Val(); + Cerr << "still active sessions ... " << pendingCompilations << Endl; + } while (pendingSessions != 0); + + Sleep(TDuration::Seconds(5)); + return; } |