Skip to content

Commit

Permalink
Change timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgarbar committed Sep 26, 2024
1 parent 899b09a commit f55eab3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ch_tools/chadmin/cli/wait_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ def wait_replication_sync_command(
for replica in list_table_replicas(ctx):
full_name = f"`{replica['database']}`.`{replica['table']}`"
time_left = deadline - time.time()
timeout = min(replica_timeout.total_seconds(), time_left)

execute_query(
ctx,
f"SYSTEM SYNC REPLICA {full_name}",
format_=None,
timeout=time_left,
settings={"receive_timeout": timeout},
timeout=replica_timeout.total_seconds(),
settings={"receive_timeout": time_left},
)
except requests.exceptions.ReadTimeout:
logging.error("Read timeout while running query.")
Expand Down
2 changes: 1 addition & 1 deletion tests/features/chadmin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Feature: chadmin commands.
"""
Then it fails with response contains
"""
Timeout while running query.
Read timeout while running query.
"""
When we execute query on clickhouse01
"""
Expand Down

0 comments on commit f55eab3

Please sign in to comment.