This commit is contained in:
Alexander Tokmakov 2022-07-21 13:57:24 +02:00
parent e019b6ba69
commit f79f12408d
2 changed files with 4 additions and 14 deletions

View File

@ -123,15 +123,13 @@ ColumnsDescription getStructureOfRemoteTable(
std::string fail_messages;
// use local shard as first priority, as it needs no network communication
/// Use local shard as first priority, as it needs no network communication
for (const auto & shard_info : shards_info)
{
if (shard_info.isLocal())
{
const auto & res = getStructureOfRemoteTableInShard(cluster, shard_info, table_id, context, table_func_ptr);
if (res.empty())
break;
chassert(!res.empty());
return res;
}
}

View File

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