From bb2b2bfa474ce775b422613cb3141d74b06a07b1 Mon Sep 17 00:00:00 2001 From: wuxiaobai24 Date: Mon, 9 May 2022 13:57:27 +0800 Subject: [PATCH] add test --- .../02293_test_zstd_window_log_max.reference | 2 ++ .../0_stateless/02293_test_zstd_window_log_max.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/queries/0_stateless/02293_test_zstd_window_log_max.reference create mode 100755 tests/queries/0_stateless/02293_test_zstd_window_log_max.sh diff --git a/tests/queries/0_stateless/02293_test_zstd_window_log_max.reference b/tests/queries/0_stateless/02293_test_zstd_window_log_max.reference new file mode 100644 index 00000000000..98ca7fb2d29 --- /dev/null +++ b/tests/queries/0_stateless/02293_test_zstd_window_log_max.reference @@ -0,0 +1,2 @@ +1 +40 diff --git a/tests/queries/0_stateless/02293_test_zstd_window_log_max.sh b/tests/queries/0_stateless/02293_test_zstd_window_log_max.sh new file mode 100755 index 00000000000..764b0e8b2d3 --- /dev/null +++ b/tests/queries/0_stateless/02293_test_zstd_window_log_max.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +# Tags: no-parallel + +CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=../shell_config.sh +. "$CUR_DIR"/../shell_config.sh + +# reuse the test data in 02293_test_zstd_window_log_max.sh +$CLICKHOUSE_LOCAL --query "SELECT count() FROM file('$CUR_DIR/data_zstd/test_01946.zstd', JSONEachRow, 'foo String') SETTINGS zstd_window_log_max=20" 2>&1 | grep -c \ + "Code: 561. DB::Exception: Zstd stream encoding failed: error 'Frame requires too much memory for decoding'; zstd version: 1.5.0: While executing File. (ZSTD_DECODER_FAILED)" +$CLICKHOUSE_LOCAL --query "SELECT count() FROM file('$CUR_DIR/data_zstd/test_01946.zstd', JSONEachRow, 'foo String') SETTINGS zstd_window_log_max=21" \ No newline at end of file