From 8f0cf29a56307e96c763fde6d293d8f551364968 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 10 Jan 2018 04:45:28 +0300 Subject: [PATCH] Miscellaneous [#CLICKHOUSE-2]. --- .../queries/0_stateless/00429_http_bufferization.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00429_http_bufferization.sh b/dbms/tests/queries/0_stateless/00429_http_bufferization.sh index ab87950d38b..27a79f37cd1 100755 --- a/dbms/tests/queries/0_stateless/00429_http_bufferization.sh +++ b/dbms/tests/queries/0_stateless/00429_http_bufferization.sh @@ -27,8 +27,8 @@ function check_only_exception() { #(echo "$res") #(echo "$res" | wc -l) #(echo "$res" | grep -c "^$exception_pattern") - [[ `echo "$res" | wc -l` -eq 1 ]] || echo FAIL - [[ $(echo "$res" | grep -c "^$exception_pattern") -eq 1 ]] || echo FAIL + [[ `echo "$res" | wc -l` -eq 1 ]] || echo FAIL 1 $@ + [[ $(echo "$res" | grep -c "^$exception_pattern") -eq 1 ]] || echo FAIL 2 $@ } function check_last_line_exception() { @@ -36,12 +36,12 @@ function check_last_line_exception() { #echo "$res" > res #echo "$res" | wc -c #echo "$res" | tail -n -2 - [[ $(echo "$res" | tail -n -1 | grep -c "$exception_pattern") -eq 1 ]] || echo FAIL - [[ $(echo "$res" | head -n -1 | grep -c "$exception_pattern") -eq 0 ]] || echo FAIL + [[ $(echo "$res" | tail -n -1 | grep -c "$exception_pattern") -eq 1 ]] || echo FAIL 3 $@ + [[ $(echo "$res" | head -n -1 | grep -c "$exception_pattern") -eq 0 ]] || echo FAIL 4 $@ } function check_exception_handling() { - check_only_exception "max_result_bytes=1000" 1001 + check_only_exception "max_result_bytes=1000" 1001 check_only_exception "max_result_bytes=1000&wait_end_of_query=1" 1001 check_only_exception "max_result_bytes=1048576&buffer_size=1048576&wait_end_of_query=0" 1048577 @@ -69,7 +69,7 @@ function cmp_cli_and_http() { $CLICKHOUSE_CLIENT -q "`query $1`" > ${CLICKHOUSE_TMP}/res1 ch_url "buffer_size=$2&wait_end_of_query=0" "$1" > ${CLICKHOUSE_TMP}/res2 ch_url "buffer_size=$2&wait_end_of_query=1" "$1" > ${CLICKHOUSE_TMP}/res3 - cmp ${CLICKHOUSE_TMP}/res1 ${CLICKHOUSE_TMP}/res2 && cmp ${CLICKHOUSE_TMP}/res1 ${CLICKHOUSE_TMP}/res3 || echo FAIL + cmp ${CLICKHOUSE_TMP}/res1 ${CLICKHOUSE_TMP}/res2 && cmp ${CLICKHOUSE_TMP}/res1 ${CLICKHOUSE_TMP}/res3 || echo FAIL 5 $@ rm -rf ${CLICKHOUSE_TMP}/res1 ${CLICKHOUSE_TMP}/res2 ${CLICKHOUSE_TMP}/res3 }