mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #66171 from azat/tests/01563_distributed_query_finish
tests: fix 01563_distributed_query_finish flakiness (due to system.*_log_sender)
This commit is contained in:
commit
ed70bc863e
@ -1,2 +1 @@
|
||||
1,0
|
||||
NETWORK_ERROR=0
|
||||
|
@ -19,20 +19,25 @@ create table dist_01247 as data_01247 engine=Distributed(test_cluster_two_shards
|
||||
select * from dist_01247 format Null;
|
||||
EOL
|
||||
|
||||
network_errors_before=$($CLICKHOUSE_CLIENT -q "SELECT value FROM system.errors WHERE name = 'NETWORK_ERROR'")
|
||||
# NOTE: it is possible to got NETWORK_ERROR even with no-parallel, at least due to system.*_log_sender to the cloud
|
||||
for ((i = 0; i < 100; ++i)); do
|
||||
network_errors_before=$($CLICKHOUSE_CLIENT -q "SELECT value FROM system.errors WHERE name = 'NETWORK_ERROR'")
|
||||
|
||||
opts=(
|
||||
"--max_distributed_connections=1"
|
||||
"--optimize_skip_unused_shards=1"
|
||||
"--optimize_distributed_group_by_sharding_key=1"
|
||||
"--prefer_localhost_replica=0"
|
||||
)
|
||||
$CLICKHOUSE_CLIENT "${opts[@]}" --format CSV -nm <<EOL
|
||||
select count(), * from dist_01247 group by number order by number limit 1;
|
||||
EOL
|
||||
opts=(
|
||||
"--max_distributed_connections=1"
|
||||
"--optimize_skip_unused_shards=1"
|
||||
"--optimize_distributed_group_by_sharding_key=1"
|
||||
"--prefer_localhost_replica=0"
|
||||
)
|
||||
$CLICKHOUSE_CLIENT "${opts[@]}" --format CSV -nm -q "select count(), * from dist_01247 group by number order by number limit 1 format Null"
|
||||
|
||||
# expect zero new network errors
|
||||
network_errors_after=$($CLICKHOUSE_CLIENT -q "SELECT value FROM system.errors WHERE name = 'NETWORK_ERROR'")
|
||||
# expect zero new network errors
|
||||
network_errors_after=$($CLICKHOUSE_CLIENT -q "SELECT value FROM system.errors WHERE name = 'NETWORK_ERROR'")
|
||||
|
||||
if [[ $((network_errors_after-network_errors_before)) -eq 0 ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
echo NETWORK_ERROR=$(( network_errors_after-network_errors_before ))
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop table data_01247"
|
||||
|
Loading…
Reference in New Issue
Block a user