mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Create table with the same load_balancing policy in test_insert_distributed_load_balancing
This commit is contained in:
parent
52d73c7f45
commit
dac0b7d1f5
@ -19,8 +19,7 @@ def start_cluster():
|
|||||||
finally:
|
finally:
|
||||||
cluster.shutdown()
|
cluster.shutdown()
|
||||||
|
|
||||||
@pytest.fixture(scope='function', autouse=True)
|
def create_tables(**dist_settings):
|
||||||
def create_tables():
|
|
||||||
n1.query('DROP TABLE IF EXISTS data')
|
n1.query('DROP TABLE IF EXISTS data')
|
||||||
n2.query('DROP TABLE IF EXISTS data')
|
n2.query('DROP TABLE IF EXISTS data')
|
||||||
n1.query('DROP TABLE IF EXISTS dist')
|
n1.query('DROP TABLE IF EXISTS dist')
|
||||||
@ -35,9 +34,10 @@ def create_tables():
|
|||||||
data,
|
data,
|
||||||
rand()
|
rand()
|
||||||
)
|
)
|
||||||
""")
|
""", settings=dist_settings)
|
||||||
|
|
||||||
def insert_data(**settings):
|
def insert_data(**settings):
|
||||||
|
create_tables(**settings)
|
||||||
n1.query('INSERT INTO dist SELECT * FROM numbers(10)', settings=settings)
|
n1.query('INSERT INTO dist SELECT * FROM numbers(10)', settings=settings)
|
||||||
n1.query('SYSTEM FLUSH DISTRIBUTED dist')
|
n1.query('SYSTEM FLUSH DISTRIBUTED dist')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user