2020-12-06 22:12:54 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
2020-12-28 11:46:53 +00:00
|
|
|
# shellcheck source=../shell_config.sh
|
2020-12-06 22:12:54 +00:00
|
|
|
. "$CURDIR"/../shell_config.sh
|
|
|
|
|
|
|
|
common_opts=(
|
|
|
|
"--format=Null"
|
|
|
|
|
|
|
|
"--max_threads=1"
|
|
|
|
"--max_distributed_connections=3"
|
|
|
|
)
|
|
|
|
|
|
|
|
# NOTE: the test use higher timeout to avoid flakiness.
|
|
|
|
timeout 9s ${CLICKHOUSE_CLIENT} "$@" "${common_opts[@]}" -q "select sleep(3) from remote('127.{1,2,3,4,5}', system.one)" --prefer_localhost_replica=0
|
|
|
|
timeout 9s ${CLICKHOUSE_CLIENT} "$@" "${common_opts[@]}" -q "select sleep(3) from remote('127.{1,2,3,4,5}', system.one)" --prefer_localhost_replica=1
|