From ac62356477c87a84142609afa2e315a1ce81f4cd Mon Sep 17 00:00:00 2001 From: Alexander Tokmakov Date: Thu, 16 Feb 2023 13:05:13 +0100 Subject: [PATCH] fix --- .../configs/config.d/storage_conf.xml | 7 ------- .../test.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_replicated_merge_tree_s3_zero_copy/configs/config.d/storage_conf.xml b/tests/integration/test_replicated_merge_tree_s3_zero_copy/configs/config.d/storage_conf.xml index 801e2072f17..15239041478 100644 --- a/tests/integration/test_replicated_merge_tree_s3_zero_copy/configs/config.d/storage_conf.xml +++ b/tests/integration/test_replicated_merge_tree_s3_zero_copy/configs/config.d/storage_conf.xml @@ -55,11 +55,4 @@ 3 0 - - - system - zookeeper_log
- 5000 - 5000 -
diff --git a/tests/integration/test_replicated_merge_tree_s3_zero_copy/test.py b/tests/integration/test_replicated_merge_tree_s3_zero_copy/test.py index fb93dc8aa7c..f0bc12e3125 100644 --- a/tests/integration/test_replicated_merge_tree_s3_zero_copy/test.py +++ b/tests/integration/test_replicated_merge_tree_s3_zero_copy/test.py @@ -160,7 +160,11 @@ def test_drop_table(cluster): "action": "REJECT --reject-with tcp-reset", } ) + + # Will drop in background with retries node.query("drop table test_drop_table") + + # It should not be possible to create a replica with the same path until the previous one is completely dropped for i in range(0, 100): node.query_and_get_answer_with_error( "create table if not exists test_drop_table (n int) " @@ -169,11 +173,21 @@ def test_drop_table(cluster): ) time.sleep(0.2) + # Wait for drop to actually finish + node.wait_for_log_line( + "Removing metadata /var/lib/clickhouse/metadata_dropped/default.test_drop_table", + timeout=60, + look_behind_lines=1000000, + ) + + # It could leave some leftovers, remove them replicas = node.query_with_retry( "select name from system.zookeeper where path='/test/drop_table/replicas'" ) if "1" in replicas and "test_drop_table" not in node.query("show tables"): node2.query("system drop replica '1' from table test_drop_table") + + # Just in case table was not created due to connection errors node.query( "create table if not exists test_drop_table (n int) engine=ReplicatedMergeTree('/test/drop_table', '1') " "order by n partition by n % 99 settings storage_policy='s3'"