@@ -31,13 +31,15 @@ void FillTableWithData(NQuery::TQueryClient& db, ui64 numRows=300) {
31
31
}
32
32
}
33
33
34
- void RunTestForQuery (const std::string& query, const std::string& expectedLog) {
34
+ void RunTestForQuery (const std::string& query, const std::string& expectedLog, bool enabledLogs ) {
35
35
TStringStream logsStream;
36
36
37
37
Cerr << " cwd: " << NFs::CurrentWorkingDirectory () << Endl;
38
38
TKikimrRunner kikimr (AppSettings (logsStream));
39
39
40
- kikimr.GetTestServer ().GetRuntime ()->SetLogPriority (NKikimrServices::KQP_TASKS_RUNNER, NActors::NLog::PRI_DEBUG);
40
+ if (enabledLogs) {
41
+ kikimr.GetTestServer ().GetRuntime ()->SetLogPriority (NKikimrServices::KQP_TASKS_RUNNER, NActors::NLog::PRI_DEBUG);
42
+ }
41
43
42
44
auto db = kikimr.GetQueryClient ();
43
45
@@ -64,25 +66,27 @@ void RunTestForQuery(const std::string& query, const std::string& expectedLog) {
64
66
break ;
65
67
}
66
68
}
67
- // TODO: Uncomment after: https://github.com/ydb-platform/ydb/issues/15597
68
- Y_UNUSED (hasExpectedLog);
69
- // UNIT_ASSERT(hasExpectedLog);
69
+
70
+ // TODO: remove this if after https://github.com/ydb-platform/ydb/issues/15597
71
+ if (!enabledLogs) {
72
+ UNIT_ASSERT (hasExpectedLog == enabledLogs);
73
+ }
70
74
}
71
75
72
76
} // anonymous namespace
73
77
74
78
Y_UNIT_TEST_SUITE (KqpScanLogs) {
75
79
76
- Y_UNIT_TEST (WideCombine) {
80
+ Y_UNIT_TEST_TWIN (WideCombine, EnabledLogs ) {
77
81
auto query = R"(
78
82
--!syntax_v1
79
83
select count(t.Key) from `/Root/KeyValue` as t group by t.Value
80
84
)" ;
81
85
82
- RunTestForQuery (query, " [WideCombine]" );
86
+ RunTestForQuery (query, " [WideCombine]" , EnabledLogs );
83
87
}
84
88
85
- Y_UNIT_TEST (GraceJoin) {
89
+ Y_UNIT_TEST_TWIN (GraceJoin, EnabledLogs ) {
86
90
auto query = R"(
87
91
--!syntax_v1
88
92
PRAGMA ydb.CostBasedOptimizationLevel='0';
@@ -92,7 +96,7 @@ Y_UNIT_TEST(GraceJoin) {
92
96
order by t1.Value
93
97
)" ;
94
98
95
- RunTestForQuery (query, " [GraceJoin]" );
99
+ RunTestForQuery (query, " [GraceJoin]" , EnabledLogs );
96
100
}
97
101
98
102
0 commit comments