mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #52189 from ClickHouse/fix-test_multiple_disks
Fix `test_multiple_disks/test.py::test_start_stop_moves`
This commit is contained in:
commit
bfe349a7e4
@ -818,9 +818,10 @@ def test_start_stop_moves(start_cluster, name, engine):
|
|||||||
node1.query(f"SYSTEM STOP MOVES {name}")
|
node1.query(f"SYSTEM STOP MOVES {name}")
|
||||||
node1.query(f"SYSTEM STOP MERGES {name}")
|
node1.query(f"SYSTEM STOP MERGES {name}")
|
||||||
|
|
||||||
|
first_part = None
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
data = [] # 5MB in total
|
data = [] # 5MB in total
|
||||||
for i in range(5):
|
for _ in range(5):
|
||||||
data.append(get_random_string(1024 * 1024)) # 1MB row
|
data.append(get_random_string(1024 * 1024)) # 1MB row
|
||||||
# jbod size is 40MB, so lets insert 5MB batch 7 times
|
# jbod size is 40MB, so lets insert 5MB batch 7 times
|
||||||
node1.query_with_retry(
|
node1.query_with_retry(
|
||||||
@ -829,8 +830,14 @@ def test_start_stop_moves(start_cluster, name, engine):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# we cannot rely simply on modification time of part because it can be changed
|
||||||
|
# by different background operations so we explicitly check after the first
|
||||||
|
# part is inserted
|
||||||
|
if i == 0:
|
||||||
first_part = get_oldest_part(node1, name)
|
first_part = get_oldest_part(node1, name)
|
||||||
|
|
||||||
|
assert first_part is not None
|
||||||
|
|
||||||
used_disks = get_used_disks_for_table(node1, name)
|
used_disks = get_used_disks_for_table(node1, name)
|
||||||
|
|
||||||
retry = 5
|
retry = 5
|
||||||
|
Loading…
Reference in New Issue
Block a user