Merge pull request #55627 from azat/tests/fix-test_system_merges

Fix flakiness of test_system_merges (by increasing sleep interval properly)
This commit is contained in:
robot-clickhouse-ci-1 2023-10-14 17:50:04 +02:00 committed by GitHub
commit b41bdf38e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -0,0 +1,7 @@
<clickhouse>
<profiles>
<default>
<function_sleep_max_microseconds_per_block>10G</function_sleep_max_microseconds_per_block>
</default>
</profiles>
</clickhouse>

View File

@ -10,6 +10,7 @@ cluster = ClickHouseCluster(__file__)
node1 = cluster.add_instance(
"node1",
main_configs=["configs/logs_config.xml"],
user_configs=["configs/user_overrides.xml"],
with_zookeeper=True,
macros={"shard": 0, "replica": 1},
)
@ -17,6 +18,7 @@ node1 = cluster.add_instance(
node2 = cluster.add_instance(
"node2",
main_configs=["configs/logs_config.xml"],
user_configs=["configs/user_overrides.xml"],
with_zookeeper=True,
macros={"shard": 0, "replica": 2},
)
@ -183,10 +185,10 @@ def test_mutation_simple(started_cluster, replicated):
starting_block, starting_block, starting_block + 1
)
# ALTER will sleep for 3s * 3 (rows) = 9s
# ALTER will sleep for 9s
def alter():
node1.query(
f"ALTER TABLE {name} UPDATE a = 42 WHERE sleep(3) OR 1",
f"ALTER TABLE {name} UPDATE a = 42 WHERE sleep(9) OR 1",
settings=settings,
)