mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
tests: simplify 02124_buffer_with_type_map_long using clickhouse-benchmark
Using clickhouse-benchmark is better since it can send way more queries, especially if you have debug/sanitizers build. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
e67fc54fc9
commit
62d01f3943
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tags: no-fasttest
|
||||
|
||||
# Regression test for incorrect mutation of Map() column, see [1].
|
||||
#
|
||||
# [1]: https://github.com/ClickHouse/ClickHouse/issues/30546
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
@ -8,29 +12,11 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS t_buffer_map"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE TABLE t_buffer_map(m1 Map(String, UInt64), m2 Map(String, String)) ENGINE = Buffer('', '', 1, 1, 1, 1000000000000, 1000000000000, 1000000000000, 1000000000000)"
|
||||
|
||||
function insert1
|
||||
{
|
||||
while true; do
|
||||
$CLICKHOUSE_CLIENT -q "INSERT INTO t_buffer_map SELECT (range(10), range(10)), (range(10), range(10)) from numbers(100)"
|
||||
done
|
||||
}
|
||||
|
||||
function select1
|
||||
{
|
||||
while true; do
|
||||
$CLICKHOUSE_CLIENT -q "SELECT * FROM t_buffer_map" 2> /dev/null > /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
TIMEOUT=10
|
||||
|
||||
export -f insert1
|
||||
export -f select1
|
||||
|
||||
timeout $TIMEOUT bash -c insert1 &
|
||||
timeout $TIMEOUT bash -c select1 &
|
||||
|
||||
wait
|
||||
# --continue_on_errors -- to ignore possible MEMORY_LIMIT_EXCEEDED errors
|
||||
$CLICKHOUSE_BENCHMARK --randomize --timelimit 10 --continue_on_errors --concurrency 10 >& /dev/null <<EOL
|
||||
INSERT INTO t_buffer_map SELECT (range(10), range(10)), (range(10), range(10)) from numbers(100)
|
||||
SELECT * FROM t_buffer_map
|
||||
EOL
|
||||
|
||||
echo "OK"
|
||||
$CLICKHOUSE_CLIENT -q "DROP TABLE t_buffer_map"
|
||||
|
Loading…
Reference in New Issue
Block a user