From b581bbec68abd31e62186b76deee5210161dd2e4 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 10 Mar 2018 02:07:08 +0300 Subject: [PATCH] Added test #245 --- .../0_stateless/00600_replace_running_query.reference | 1 + .../0_stateless/00600_replace_running_query.sh | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 dbms/tests/queries/0_stateless/00600_replace_running_query.reference create mode 100755 dbms/tests/queries/0_stateless/00600_replace_running_query.sh diff --git a/dbms/tests/queries/0_stateless/00600_replace_running_query.reference b/dbms/tests/queries/0_stateless/00600_replace_running_query.reference new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00600_replace_running_query.reference @@ -0,0 +1 @@ +0 diff --git a/dbms/tests/queries/0_stateless/00600_replace_running_query.sh b/dbms/tests/queries/0_stateless/00600_replace_running_query.sh new file mode 100755 index 00000000000..37799069779 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00600_replace_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&replace_running_query=1" -d 'SELECT sum(ignore(*)) FROM (SELECT number % 1000 AS k, groupArray(number) FROM numbers(100000000) GROUP BY k)' & +sleep 0.1 # First query (usually) should be received by the server after this sleep. +$CLICKHOUSE_CURL -sS "$CLICKHOUSE_URL?query_id=hello&replace_running_query=1" -d 'SELECT 1 WHERE 0' +wait