From c65375971401496e0e4ea1fca4837b85470867b9 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 10 Mar 2018 02:24:38 +0300 Subject: [PATCH] Added another test #245 --- .../0_stateless/00601_kill_running_query.reference | 1 + .../queries/0_stateless/00601_kill_running_query.sh | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00601_kill_running_query.reference create mode 100755 dbms/tests/queries/0_stateless/00601_kill_running_query.sh diff --git a/dbms/tests/queries/0_stateless/00601_kill_running_query.reference b/dbms/tests/queries/0_stateless/00601_kill_running_query.reference new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00601_kill_running_query.reference @@ -0,0 +1 @@ +1 diff --git a/dbms/tests/queries/0_stateless/00601_kill_running_query.sh b/dbms/tests/queries/0_stateless/00601_kill_running_query.sh new file mode 100755 index 00000000000..6e983d4f23a --- /dev/null +++ b/dbms/tests/queries/0_stateless/00601_kill_running_query.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + +set -e -o pipefail + +$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL?query_id=hello" -d 'SELECT sum(ignore(*)) FROM (SELECT number % 1000 AS k, groupArray(number) FROM numbers(100000000) GROUP BY k)' | wc -l & +sleep 0.1 # First query (usually) should be received by the server after this sleep. +$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL" -d "KILL QUERY WHERE query_id = 'hello' FORMAT Null" +wait