diff --git a/tests/queries/0_stateless/01238_http_memory_tracking.reference b/tests/queries/0_stateless/01238_http_memory_tracking.reference index 5caff40c4a0..83b33d238da 100644 --- a/tests/queries/0_stateless/01238_http_memory_tracking.reference +++ b/tests/queries/0_stateless/01238_http_memory_tracking.reference @@ -1 +1 @@ -10000 +1000 diff --git a/tests/queries/0_stateless/01238_http_memory_tracking.sh b/tests/queries/0_stateless/01238_http_memory_tracking.sh index e2d6646e20a..508a15a536f 100755 --- a/tests/queries/0_stateless/01238_http_memory_tracking.sh +++ b/tests/queries/0_stateless/01238_http_memory_tracking.sh @@ -3,27 +3,17 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) . $CURDIR/../shell_config.sh -# Don't even try to do run under sanitizers, since they are too slow. -${CLICKHOUSE_LOCAL} --query "SELECT max(value LIKE '%sanitize%') FROM system.build_options" | grep -q '1' && echo 'Skip test for sanitizer build' && exit - -# TODO: the test can be way more optimal - set -o pipefail -function execute_null() -{ - ${CLICKHOUSE_CLIENT} --format Null -n "$@" -} - # This is needed to keep at least one running query for user for the time of test. -# (10k http queries takes 10seconds, let's run for 3x more to avoid flaps) -execute_null <<<'SELECT sleepEachRow(1) FROM numbers(30)' & +# (1k http queries takes ~1 second, let's run for 5x more to avoid flaps) +${CLICKHOUSE_CLIENT} --format Null -n <<<'SELECT sleepEachRow(1) FROM numbers(5)' & # ignore "yes: standard output: Broken pipe" yes 'SELECT 1' 2>/dev/null | { - head -n10000 + head -n1000 } | { - xargs -P10000 -i ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&wait_end_of_query=1&max_memory_usage_for_user=$((10<<30))" -d '{}' + xargs -i ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&wait_end_of_query=1&max_memory_usage_for_user=$((1<<30))" -d '{}' } | grep -x -c 1 wait