From bd5ddf052436cc00a9eeb5cae78758413552e7ef Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Tue, 30 Mar 2021 13:49:43 +0300 Subject: [PATCH] fixes --- docker/test/stateless/run.sh | 2 +- .../0_stateless/01547_query_log_current_database.sql | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docker/test/stateless/run.sh b/docker/test/stateless/run.sh index 0781e346bb2..61153ce3864 100755 --- a/docker/test/stateless/run.sh +++ b/docker/test/stateless/run.sh @@ -75,7 +75,7 @@ timeout "$MAX_RUN_TIME" bash -c run_tests ||: ./process_functional_tests_result.py || echo -e "failure\tCannot parse results" > /test_output/check_status.tsv -clickhouse-client -q "sytem flush logs" ||: +clickhouse-client -q "system flush logs" ||: pigz < /var/log/clickhouse-server/clickhouse-server.log > /test_output/clickhouse-server.log.gz & clickhouse-client -q "select * from system.query_log format TSVWithNamesAndTypes" | pigz > /test_output/query-log.tsv.gz & diff --git a/tests/queries/0_stateless/01547_query_log_current_database.sql b/tests/queries/0_stateless/01547_query_log_current_database.sql index 755df2fab41..5eec8a81ccc 100644 --- a/tests/queries/0_stateless/01547_query_log_current_database.sql +++ b/tests/queries/0_stateless/01547_query_log_current_database.sql @@ -21,7 +21,7 @@ system flush logs; select count() from system.query_log where - query like '%01547_query_log_current_database%' + query like 'select \'01547_query_log_current_database%' and current_database = currentDatabase() and event_date >= yesterday(); @@ -30,7 +30,6 @@ where select count() == 2 from system.query_thread_log where - query like '%01547_query_log_current_database%' + query like 'select \'01547_query_log_current_database%' and current_database = currentDatabase() - and event_date = today() - and event_time >= now() - interval 1 minute; + and event_date >= yesterday()