CLICKHOUSE-3847 fix time for cleanupthread and sleep()

This commit is contained in:
VadimPE 2018-08-29 17:13:20 +03:00
parent a90a9af818
commit 5c370143c4

View File

@ -10,7 +10,7 @@ def fill_nodes(nodes, shard):
CREATE DATABASE test; CREATE DATABASE test;
CREATE TABLE test_table(date Date, id UInt32) CREATE TABLE test_table(date Date, id UInt32)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test{shard}/replicated', '{replica}') ORDER BY id PARTITION BY toYYYYMM(date) SETTINGS min_replicated_logs_to_keep=3, max_replicated_logs_to_keep=5, cleanup_delay_period=10, cleanup_delay_period_random_add=10; ENGINE = ReplicatedMergeTree('/clickhouse/tables/test{shard}/replicated', '{replica}') ORDER BY id PARTITION BY toYYYYMM(date) SETTINGS min_replicated_logs_to_keep=3, max_replicated_logs_to_keep=5, cleanup_delay_period=0, cleanup_delay_period_random_add=0;
'''.format(shard=shard, replica=node.name)) '''.format(shard=shard, replica=node.name))
cluster = ClickHouseCluster(__file__) cluster = ClickHouseCluster(__file__)
@ -40,10 +40,10 @@ def test_recovery(start_cluster):
for i in range(100): for i in range(100):
node1.query("INSERT INTO test_table VALUES (1, {})".format(i)) node1.query("INSERT INTO test_table VALUES (1, {})".format(i))
time.sleep(40) time.sleep(2)
node2.query("ATTACH TABLE test_table") node2.query("ATTACH TABLE test_table")
time.sleep(40) time.sleep(2)
assert node1.query("SELECT count(*) FROM test_table") == node2.query("SELECT count(*) FROM test_table") assert node1.query("SELECT count(*) FROM test_table") == node2.query("SELECT count(*) FROM test_table")