mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
30 lines
883 B
Python
30 lines
883 B
Python
import os
|
|
|
|
import pytest
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
|
cluster = ClickHouseCluster(__file__)
|
|
node_memory = cluster.add_instance(
|
|
"node_memory", dictionaries=["configs/dictionaries/complex_key_cache_string.xml"]
|
|
)
|
|
node_ssd = cluster.add_instance(
|
|
"node_ssd", dictionaries=["configs/dictionaries/ssd_complex_key_cache_string.xml"]
|
|
)
|
|
|
|
|
|
@pytest.fixture()
|
|
def started_cluster():
|
|
try:
|
|
cluster.start()
|
|
node_memory.query(
|
|
"create table radars_table (radar_id String, radar_ip String, client_id String) engine=MergeTree() order by radar_id"
|
|
)
|
|
node_ssd.query(
|
|
"create table radars_table (radar_id String, radar_ip String, client_id String) engine=MergeTree() order by radar_id"
|
|
)
|
|
|
|
yield cluster
|
|
finally:
|
|
cluster.shutdown()
|