ClickHouse/tests/queries/0_stateless/02044_url_glob_parallel.sh

16 lines
581 B
Bash
Raw Normal View History

2021-10-03 04:49:06 +00:00
#!/usr/bin/env bash
# Tags: distributed
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
2021-10-11 13:40:12 +00:00
i=0 retries=60
2021-10-03 04:49:06 +00:00
# Sometimes five seconds are not enough due to system overload.
# But if it can run in less than five seconds at least sometimes - it is enough for the test.
2021-10-11 13:40:12 +00:00
while [[ $i -lt $retries ]]; do
2021-10-03 04:49:06 +00:00
timeout 5s ${CLICKHOUSE_CLIENT} --max_threads 10 --query "SELECT * FROM url('http://127.0.0.{1..10}:${CLICKHOUSE_PORT_HTTP}/?query=SELECT+sleep(1)', TSV, 'x UInt8')" --format Null && break
2021-10-11 13:40:12 +00:00
((++i))
2021-10-03 04:49:06 +00:00
done