fix test_distributed_respect_user_timeouts

This commit is contained in:
Alexander Tokmakov 2020-04-01 17:52:37 +03:00
parent 836c6fed80
commit 90dd36346e

View File

@ -108,7 +108,16 @@ def started_cluster(request):
def _check_timeout_and_exception(node, user, query_base, query):
repeats = EXPECTED_BEHAVIOR[user]['times']
expected_timeout = EXPECTED_BEHAVIOR[user]['timeout'] * repeats
extra_repeats = 1
# Table function remote() are executed two times.
# It tries to get table stucture from remote shards.
# On 'node'2 it will firsty try to get structure from 'node1' (which is not available),
# so so threre are two extra conection attempts for 'node2' and 'remote'
if node.name == 'node2' and query_base == 'remote':
extra_repeats = 3
expected_timeout = EXPECTED_BEHAVIOR[user]['timeout'] * repeats * extra_repeats
start = timeit.default_timer()
exception = node.query_and_get_error(query, user=user)