mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix bash warning in the test. [#CLICKHOUSE-3385]
Also use 'clickhouse compressor' util instead of clickhouse-compressor binary.
This commit is contained in:
parent
4a55e5f94b
commit
4b9163c3cc
@ -5,7 +5,8 @@ max_block_size=100
|
||||
URL='http://localhost:8123/'
|
||||
|
||||
function query {
|
||||
echo "SELECT toUInt8(intHash64(number)) FROM system.numbers LIMIT $1 FORMAT RowBinary"
|
||||
# bash isn't able to store \0 bytes, so use [1; 255] random range
|
||||
echo "SELECT greatest(toUInt8(1), toUInt8(intHash64(number))) FROM system.numbers LIMIT $1 FORMAT RowBinary"
|
||||
}
|
||||
|
||||
function ch_url() {
|
||||
@ -81,13 +82,12 @@ check_cli_and_http
|
||||
|
||||
|
||||
# Check HTTP internal compression in normal case
|
||||
# Skip if clickhouse-compressor not installed
|
||||
|
||||
function cmp_http_compression() {
|
||||
clickhouse-client -q "`query $1`" > res0
|
||||
ch_url 'compress=1' $1 | clickhouse-compressor --decompress > res1
|
||||
ch_url "compress=1&buffer_size=$2&wait_end_of_query=0" $1 | clickhouse-compressor --decompress > res2
|
||||
ch_url "compress=1&buffer_size=$2&wait_end_of_query=1" $1 | clickhouse-compressor --decompress > res3
|
||||
ch_url 'compress=1' $1 | clickhouse compressor --decompress > res1
|
||||
ch_url "compress=1&buffer_size=$2&wait_end_of_query=0" $1 | clickhouse compressor --decompress > res2
|
||||
ch_url "compress=1&buffer_size=$2&wait_end_of_query=1" $1 | clickhouse compressor --decompress > res3
|
||||
cmp res0 res1
|
||||
cmp res1 res2
|
||||
cmp res1 res3
|
||||
@ -103,8 +103,4 @@ function check_http_compression() {
|
||||
done
|
||||
}
|
||||
|
||||
has_compressor=$(command -v clickhouse-compressor &>/dev/null && echo 1 || echo 0)
|
||||
|
||||
if [[ $has_compressor -eq 1 ]]; then
|
||||
check_http_compression
|
||||
fi
|
||||
check_http_compression
|
||||
|
Loading…
Reference in New Issue
Block a user