def started_node(): cluster = helpers.cluster.ClickHouseCluster(__file__) try: node = cluster.add_instance("node", main_configs=[ os.path.join(SCRIPT_DIR, "configs", "config_send_crash_reports.xml") ]) cluster.start() yield node finally: cluster.shutdown()
def started_node(): cluster = helpers.cluster.ClickHouseCluster(__file__) try: node = cluster.add_instance("node", main_configs=[ os.path.join( SCRIPT_DIR, "configs", "config_send_crash_reports.xml") ]) cluster.start() yield node finally: # It will print Fatal message after pkill -SEGV, suppress it try: cluster.shutdown() except: pass
import time import xml.etree.ElementTree as ET import helpers.client import helpers.cluster import pytest cluster = helpers.cluster.ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', main_configs=['configs/logs_config.xml'], with_zookeeper=True, stay_alive=True, tmpfs=[ '/jbod1:size=40M', '/jbod2:size=40M', '/jbod3:size=40M', '/jbod4:size=40M', '/external:size=200M' ], macros={ "shard": 0, "replica": 1 }) node2 = cluster.add_instance('node2', main_configs=['configs/logs_config.xml'], with_zookeeper=True, stay_alive=True, tmpfs=[ '/jbod1:size=40M', '/jbod2:size=40M', '/jbod3:size=40M', '/jbod4:size=40M', '/external:size=200M'
import pytest import helpers.client import helpers.cluster from helpers.test_tools import assert_eq_with_retry cluster = helpers.cluster.ClickHouseCluster(__file__) node1 = cluster.add_instance( "node1", main_configs=["configs/remote_servers.xml", "configs/cleanup_thread.xml"], with_zookeeper=True, ) @pytest.fixture(scope="module") def started_cluster(): try: cluster.start() yield cluster finally: cluster.shutdown() def test_empty_parts_alter_delete(started_cluster): node1.query( "CREATE TABLE empty_parts_delete (d Date, key UInt64, value String) \ ENGINE = ReplicatedMergeTree('/clickhouse/tables/empty_parts_delete', 'r1', d, key, 8192)" ) node1.query( "INSERT INTO empty_parts_delete VALUES (toDate('2020-10-10'), 1, 'a')")
import pytest import helpers.client import helpers.cluster cluster = helpers.cluster.ClickHouseCluster(__file__) node1 = cluster.add_instance( 'node1', main_configs=['configs/logs_config.xml', 'configs/cluster.xml'], with_zookeeper=True, stay_alive=True) node2 = cluster.add_instance( 'node2', main_configs=['configs/logs_config.xml', 'configs/cluster.xml'], with_zookeeper=True, stay_alive=True) @pytest.fixture(scope="module") def started_cluster(): try: cluster.start() yield cluster finally: cluster.shutdown() def test_trivial_alter_in_partition_merge_tree_without_where(started_cluster): try:
import helpers.client import helpers.cluster from helpers.test_tools import TSV import pytest cluster = helpers.cluster.ClickHouseCluster(__file__) node1 = cluster.add_instance( "node1", main_configs=["configs/logs_config.xml"], with_zookeeper=True, stay_alive=True, tmpfs=[ "/jbod1:size=40M", "/jbod2:size=40M", "/jbod3:size=40M", "/jbod4:size=40M", "/external:size=200M", ], macros={"shard": 0, "replica": 1}, ) node2 = cluster.add_instance( "node2", main_configs=["configs/logs_config.xml"], with_zookeeper=True, stay_alive=True, tmpfs=[ "/jbod1:size=40M", "/jbod2:size=40M",
import pytest import helpers.client import helpers.cluster cluster = helpers.cluster.ClickHouseCluster(__file__) node1 = cluster.add_instance( "node1", main_configs=["configs/logs_config.xml", "configs/cluster.xml"], with_zookeeper=True, stay_alive=True, ) node2 = cluster.add_instance( "node2", main_configs=["configs/logs_config.xml", "configs/cluster.xml"], with_zookeeper=True, stay_alive=True, ) @pytest.fixture(scope="module") def started_cluster(): try: cluster.start() yield cluster finally: cluster.shutdown()