From 06fc69a9bcc7606b437c0770c1801f0094222699 Mon Sep 17 00:00:00 2001 From: Pavel Kovalenko Date: Thu, 15 Apr 2021 12:44:45 +0300 Subject: [PATCH] Increase CH start/stop timeouts in integration tests. --- tests/integration/helpers/cluster.py | 6 ++--- .../test_merge_tree_s3_restore/test.py | 24 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/integration/helpers/cluster.py b/tests/integration/helpers/cluster.py index f877323da81..69a66a50b6d 100644 --- a/tests/integration/helpers/cluster.py +++ b/tests/integration/helpers/cluster.py @@ -1124,7 +1124,7 @@ class ClickHouseInstance: return self.http_query(sql=sql, data=data, params=params, user=user, password=password, expect_fail_and_get_error=True) - def stop_clickhouse(self, stop_wait_sec=5, kill=False): + def stop_clickhouse(self, stop_wait_sec=30, kill=False): if not self.stay_alive: raise Exception("clickhouse can be stopped only with stay_alive=True instance") @@ -1136,7 +1136,7 @@ class ClickHouseInstance: break assert self.get_process_pid("clickhouse") is None, "ClickHouse was not stopped" - def start_clickhouse(self, start_wait_sec=5): + def start_clickhouse(self, start_wait_sec=30): if not self.stay_alive: raise Exception("clickhouse can be started again only with stay_alive=True instance") @@ -1145,7 +1145,7 @@ class ClickHouseInstance: from helpers.test_tools import assert_eq_with_retry assert_eq_with_retry(self, "select 1", "1", retry_count=int(start_wait_sec / 0.5), sleep_time=0.5) - def restart_clickhouse(self, stop_start_wait_sec=5, kill=False): + def restart_clickhouse(self, stop_start_wait_sec=30, kill=False): self.stop_clickhouse(stop_start_wait_sec, kill) self.start_clickhouse(stop_start_wait_sec) diff --git a/tests/integration/test_merge_tree_s3_restore/test.py b/tests/integration/test_merge_tree_s3_restore/test.py index bd789f4b89c..ee78737844f 100644 --- a/tests/integration/test_merge_tree_s3_restore/test.py +++ b/tests/integration/test_merge_tree_s3_restore/test.py @@ -156,7 +156,7 @@ def test_full_restore(cluster, replicated): node.stop_clickhouse() drop_s3_metadata(node) create_restore_file(node) - node.start_clickhouse(10) + node.start_clickhouse() assert node.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 4) assert node.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -184,7 +184,7 @@ def test_restore_another_bucket_path(cluster): node_another_bucket.stop_clickhouse() create_restore_file(node_another_bucket, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 4) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -195,7 +195,7 @@ def test_restore_another_bucket_path(cluster): node_another_bucket_path.stop_clickhouse() create_restore_file(node_another_bucket_path, bucket="root2", path="data") - node_another_bucket_path.start_clickhouse(10) + node_another_bucket_path.start_clickhouse() assert node_another_bucket_path.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 4) assert node_another_bucket_path.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -237,7 +237,7 @@ def test_restore_different_revisions(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision1, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 2) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -248,7 +248,7 @@ def test_restore_different_revisions(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision2, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 4) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -259,7 +259,7 @@ def test_restore_different_revisions(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision3, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 4) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -291,7 +291,7 @@ def test_restore_mutations(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision_before_mutation, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 2) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -302,7 +302,7 @@ def test_restore_mutations(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision_after_mutation, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 2) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -316,7 +316,7 @@ def test_restore_mutations(cluster): purge_s3(cluster, cluster.minio_bucket_2) revision = (revision_before_mutation + revision_after_mutation) // 2 create_restore_file(node_another_bucket, revision=revision, bucket="root") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() # Wait for unfinished mutation completion. time.sleep(3) @@ -339,7 +339,7 @@ def test_migrate_to_restorable_schema(cluster): replace_config("false", "true") - node.restart_clickhouse(10) + node.restart_clickhouse() node.query("INSERT INTO s3.test VALUES {}".format(generate_values('2020-01-06', 4096))) node.query("INSERT INTO s3.test VALUES {}".format(generate_values('2020-01-06', 4096, -1))) @@ -358,7 +358,7 @@ def test_migrate_to_restorable_schema(cluster): drop_s3_metadata(node_another_bucket) purge_s3(cluster, cluster.minio_bucket_2) create_restore_file(node_another_bucket, revision=revision, bucket="root", path="another_data") - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(4096 * 6) assert node_another_bucket.query("SELECT sum(id) FROM s3.test FORMAT Values") == "({})".format(0) @@ -393,7 +393,7 @@ def test_restore_to_detached(cluster, replicated): node_another_bucket.stop_clickhouse() create_restore_file(node_another_bucket, revision=revision, bucket="root", path="data", detached=True) - node_another_bucket.start_clickhouse(10) + node_another_bucket.start_clickhouse() assert node_another_bucket.query("SELECT count(*) FROM s3.test FORMAT Values") == "({})".format(0)