mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
add test
This commit is contained in:
parent
6725168b98
commit
ef3b802b4e
@ -0,0 +1,10 @@
|
||||
<clickhouse>
|
||||
<database_atomic_delay_before_drop_table_sec>10</database_atomic_delay_before_drop_table_sec>
|
||||
<allow_moving_table_directory_to_trash>1</allow_moving_table_directory_to_trash>
|
||||
<merge_tree>
|
||||
<initialization_retry_period>10</initialization_retry_period>
|
||||
</merge_tree>
|
||||
<max_database_replicated_create_table_thread_pool_size>50</max_database_replicated_create_table_thread_pool_size>
|
||||
<allow_experimental_transactions>42</allow_experimental_transactions>
|
||||
<replica_group_name>group</replica_group_name>
|
||||
</clickhouse>
|
@ -46,7 +46,7 @@ snapshotting_node = cluster.add_instance(
|
||||
)
|
||||
snapshot_recovering_node = cluster.add_instance(
|
||||
"snapshot_recovering_node",
|
||||
main_configs=["configs/config.xml"],
|
||||
main_configs=["configs/config2.xml"],
|
||||
user_configs=["configs/settings.xml"],
|
||||
with_zookeeper=True,
|
||||
)
|
||||
@ -1522,3 +1522,24 @@ def test_auto_recovery(started_cluster):
|
||||
|
||||
assert "42\n" == bad_settings_node.query("SELECT * FROM auto_recovery.t2")
|
||||
assert "137\n" == bad_settings_node.query("SELECT * FROM auto_recovery.t1")
|
||||
|
||||
|
||||
def test_all_groups_cluster(started_cluster):
|
||||
dummy_node.query("DROP DATABASE IF EXISTS db_cluster")
|
||||
bad_settings_node.query("DROP DATABASE IF EXISTS db_cluster")
|
||||
dummy_node.query(
|
||||
"CREATE DATABASE db_cluster ENGINE = Replicated('/clickhouse/databases/all_groups_cluster', 'shard1', 'replica1');"
|
||||
)
|
||||
bad_settings_node.query(
|
||||
"CREATE DATABASE db_cluster ENGINE = Replicated('/clickhouse/databases/all_groups_cluster', 'shard1', 'replica2');"
|
||||
)
|
||||
|
||||
assert "bad_settings_node\ndummy_node\n" == dummy_node.query(
|
||||
"select host_name from system.clusters where name='db_cluster' order by host_name"
|
||||
)
|
||||
assert "bad_settings_node\n" == bad_settings_node.query(
|
||||
"select host_name from system.clusters where name='db_cluster' order by host_name"
|
||||
)
|
||||
assert "bad_settings_node\ndummy_node\n" == bad_settings_node.query(
|
||||
"select host_name from system.clusters where name='all_groups.db_cluster' order by host_name"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user