2019-08-12 09:37:48 +00:00
|
|
|
import os
|
2020-09-16 04:26:10 +00:00
|
|
|
|
|
|
|
import pytest
|
2024-09-27 10:19:39 +00:00
|
|
|
|
2019-08-12 09:37:48 +00:00
|
|
|
from helpers.cluster import ClickHouseCluster
|
|
|
|
|
2021-05-27 04:24:16 +00:00
|
|
|
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
|
|
|
|
cluster = ClickHouseCluster(__file__)
|
2021-06-04 08:43:41 +00:00
|
|
|
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"]
|
|
|
|
)
|
2022-03-22 16:39:58 +00:00
|
|
|
|
2020-09-16 04:26:10 +00:00
|
|
|
|
2021-05-27 04:24:16 +00:00
|
|
|
@pytest.fixture()
|
|
|
|
def started_cluster():
|
2019-08-12 09:37:48 +00:00
|
|
|
try:
|
|
|
|
cluster.start()
|
2021-05-27 04:24:16 +00:00
|
|
|
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(
|
2020-09-16 04:26:10 +00:00
|
|
|
"create table radars_table (radar_id String, radar_ip String, client_id String) engine=MergeTree() order by radar_id"
|
|
|
|
)
|
2019-08-12 09:37:48 +00:00
|
|
|
|
|
|
|
yield cluster
|
|
|
|
finally:
|
|
|
|
cluster.shutdown()
|