From 391054039ec8e9830d0718080ca5248473a7b295 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Wed, 4 Mar 2020 23:31:12 +0300 Subject: [PATCH] Test for max_distributed_connections (via TCP) --- .../01085_max_distributed_connections.reference | 2 ++ .../01085_max_distributed_connections.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/01085_max_distributed_connections.reference create mode 100755 dbms/tests/queries/0_stateless/01085_max_distributed_connections.sh diff --git a/dbms/tests/queries/0_stateless/01085_max_distributed_connections.reference b/dbms/tests/queries/0_stateless/01085_max_distributed_connections.reference new file mode 100644 index 00000000000..aa47d0d46d4 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01085_max_distributed_connections.reference @@ -0,0 +1,2 @@ +0 +0 diff --git a/dbms/tests/queries/0_stateless/01085_max_distributed_connections.sh b/dbms/tests/queries/0_stateless/01085_max_distributed_connections.sh new file mode 100755 index 00000000000..44d20d048b8 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01085_max_distributed_connections.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + +opts=( + --max_distributed_connections 2 + --max_threads 1 + --query "SELECT sleepEachRow(1) FROM remote('127.{2,3}', system.one)" +) +# 1.8 less then 2 seconds, but long enough to cover possible load peaks +# "$@" left to pass manual options (like --experimental_use_processors 0) during manual testing +timeout 1.8s $CLICKHOUSE_CLIENT "${opts[@]}" "$@"