mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
tests/queries/0_stateless/01175_distributed_ddl_output_mode_long: use unique tmp file
This commit is contained in:
parent
4336038711
commit
58266e4ed6
@ -6,6 +6,8 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
TMP_OUT=$(mktemp "$CURDIR/01175_distributed_ddl_output_mode_long.XXXXXX")
|
||||
trap 'rm -f ${TMP_OUT:?}' EXIT
|
||||
|
||||
# We execute a distributed DDL query with timeout 1 to check that one host is unavailable and will time out and other complete successfully.
|
||||
# But sometimes one second is not enough even for healthy host to succeed. Repeat the test in this case.
|
||||
@ -16,11 +18,11 @@ function run_until_out_contains()
|
||||
|
||||
for _ in {1..20}
|
||||
do
|
||||
"$@" > "${CLICKHOUSE_TMP}/out" 2>&1
|
||||
if grep -q "$PATTERN" "${CLICKHOUSE_TMP}/out"
|
||||
"$@" > "$TMP_OUT" 2>&1
|
||||
if grep -q "$PATTERN" "$TMP_OUT"
|
||||
then
|
||||
cat "${CLICKHOUSE_TMP}/out"
|
||||
break;
|
||||
cat "$TMP_OUT"
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user