From e6de632c190f62daddf966b6fb5bf2c992fd22b0 Mon Sep 17 00:00:00 2001 From: Pavel Kruglov <48961922+Avogar@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:35:20 +0100 Subject: [PATCH 1/4] Fix flaky 03271_ghdata_object_to_json_alter test --- tests/queries/0_stateless/03271_ghdata_object_to_json_alter.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/queries/0_stateless/03271_ghdata_object_to_json_alter.sh b/tests/queries/0_stateless/03271_ghdata_object_to_json_alter.sh index fc217780aa3..5b838fed0e6 100755 --- a/tests/queries/0_stateless/03271_ghdata_object_to_json_alter.sh +++ b/tests/queries/0_stateless/03271_ghdata_object_to_json_alter.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -# Tags: no-fasttest, long +# Tags: no-fasttest, long, no-s3-storage +# ^ no-s3-storage: too slow CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck source=../shell_config.sh From e17973130d6e52f8bcffcfacaf0da8691dc32f76 Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Mon, 9 Dec 2024 14:44:00 +0100 Subject: [PATCH 2/4] impl --- .../0_stateless/01290_max_execution_speed_distributed.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql index d0dc554f425..4ab7c0672e6 100644 --- a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql +++ b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql @@ -21,6 +21,7 @@ FROM system.query_log WHERE current_database = currentDatabase() AND event_date >= yesterday() AND + event_time >= now() - INTERVAL '5 MINUTES' AND -- time limit for tests not marked `long` is 3 minutes, 5 should be more than enough query LIKE '%special query for 01290_max_execution_speed_distributed%' AND query NOT LIKE '%system.query_log%' AND type = 2; From b3419881ae2b6737c30e6d2424a3be76f9d6863d Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Mon, 9 Dec 2024 15:30:23 +0100 Subject: [PATCH 3/4] better --- .../0_stateless/01290_max_execution_speed_distributed.sql | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql index 4ab7c0672e6..8962f15e101 100644 --- a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql +++ b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql @@ -1,15 +1,12 @@ -- Tags: distributed -SET max_execution_speed = 1000000; -SET timeout_before_checking_execution_speed = 0; -SET max_block_size = 100; - SET log_queries=1; CREATE TEMPORARY TABLE times (t DateTime); INSERT INTO times SELECT now(); -SELECT count('special query for 01290_max_execution_speed_distributed') FROM remote('127.0.0.{2,3}', numbers(1000000)); +SELECT count('special query for 01290_max_execution_speed_distributed') FROM remote('127.0.0.{2,3}', numbers(1000000)) +SETTINGS max_execution_speed = 1000000, timeout_before_checking_execution_speed = 0, max_block_size = 100; INSERT INTO times SELECT now(); SELECT max(t) - min(t) >= 1 FROM times; From 77e52b5527897e1bc0d848f572168f6dbc13573e Mon Sep 17 00:00:00 2001 From: Nikita Taranov Date: Mon, 9 Dec 2024 16:38:35 +0100 Subject: [PATCH 4/4] fix again --- .../01290_max_execution_speed_distributed.reference | 2 +- .../0_stateless/01290_max_execution_speed_distributed.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/01290_max_execution_speed_distributed.reference b/tests/queries/0_stateless/01290_max_execution_speed_distributed.reference index ad0e80d8e69..4646cfab789 100644 --- a/tests/queries/0_stateless/01290_max_execution_speed_distributed.reference +++ b/tests/queries/0_stateless/01290_max_execution_speed_distributed.reference @@ -1,3 +1,3 @@ -2000000 +200000 1 1 diff --git a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql index 8962f15e101..2994d6d3ff3 100644 --- a/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql +++ b/tests/queries/0_stateless/01290_max_execution_speed_distributed.sql @@ -5,8 +5,8 @@ SET log_queries=1; CREATE TEMPORARY TABLE times (t DateTime); INSERT INTO times SELECT now(); -SELECT count('special query for 01290_max_execution_speed_distributed') FROM remote('127.0.0.{2,3}', numbers(1000000)) -SETTINGS max_execution_speed = 1000000, timeout_before_checking_execution_speed = 0, max_block_size = 100; +SELECT count('special query for 01290_max_execution_speed_distributed') FROM remote('127.0.0.{2,3}', numbers(100000)) +SETTINGS max_execution_speed = 100000, timeout_before_checking_execution_speed = 0, max_block_size = 100; INSERT INTO times SELECT now(); SELECT max(t) - min(t) >= 1 FROM times;