Fixed flappy test_background_move test.

This commit is contained in:
Vladimir Chebotarev 2020-10-22 03:22:00 +03:00
parent f9b0ed9325
commit fb0c7e80aa

View File

@ -493,6 +493,8 @@ def test_background_move(start_cluster, name, engine):
SETTINGS storage_policy='moving_jbod_with_external'
""".format(name=name, engine=engine))
node1.query(f"SYSTEM START MERGES {name}")
for i in range(5):
data = [] # 5MB in total
for i in range(5):
@ -521,6 +523,8 @@ def test_background_move(start_cluster, name, engine):
# first (oldest) part was moved to external
assert path.startswith("/external")
node1.query(f"SYSTEM START MERGES {name}")
finally:
node1.query(f"DROP TABLE IF EXISTS {name} SYNC")