mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Merge pull request #11834 from ClickHouse/fix-test-always-merged
Fix bad integration test "always_fetch_merged"
This commit is contained in:
commit
bcf086e592
@ -50,18 +50,14 @@ def test_replica_always_download(started_cluster):
|
|||||||
|
|
||||||
# Nothing is merged
|
# Nothing is merged
|
||||||
assert node1.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1") == "10\n"
|
assert node1.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1") == "10\n"
|
||||||
|
|
||||||
assert node2.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1") == "10\n"
|
assert node2.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1") == "10\n"
|
||||||
|
|
||||||
node1.query("SYSTEM START MERGES")
|
node1.query("SYSTEM START MERGES")
|
||||||
|
node1.query("OPTIMIZE TABLE test_table")
|
||||||
|
node2.query("SYSTEM SYNC REPLICA test_table")
|
||||||
|
|
||||||
for i in range(30):
|
|
||||||
node1_parts = node1.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1").strip()
|
node1_parts = node1.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1").strip()
|
||||||
node2_parts = node2.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1").strip()
|
node2_parts = node2.query("SELECT COUNT() FROM system.parts WHERE table = 'test_table' and active=1").strip()
|
||||||
if int(node1_parts) < 10 and int(node2_parts) < 10:
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
time.sleep(0.5)
|
|
||||||
else:
|
|
||||||
assert int(node1_parts) < 10
|
assert int(node1_parts) < 10
|
||||||
assert int(node2_parts) < 10
|
assert int(node2_parts) < 10
|
||||||
|
Loading…
Reference in New Issue
Block a user