mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Better test
This commit is contained in:
parent
90a3e95aab
commit
8cc463f549
@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/expect -f
|
#!/usr/bin/expect -f
|
||||||
|
|
||||||
log_user 0
|
log_user 1
|
||||||
set timeout 5
|
set timeout 5
|
||||||
match_max 100000
|
match_max 100000
|
||||||
|
|
||||||
if ![info exists env(CLICKHOUSE_PORT_TCP)] {set env(CLICKHOUSE_PORT_TCP) 9000}
|
if ![info exists env(CLICKHOUSE_PORT_TCP)] {set env(CLICKHOUSE_PORT_TCP) 9000}
|
||||||
|
|
||||||
spawn clickhouse-client --port "$env(CLICKHOUSE_PORT_TCP)"
|
spawn bash -c "clickhouse-client --port $env(CLICKHOUSE_PORT_TCP) && echo $?"
|
||||||
expect ":) "
|
expect ":) "
|
||||||
send -- "\4"
|
send -- "\4"
|
||||||
expect eof
|
expect eof
|
||||||
|
@ -1 +1 @@
|
|||||||
Ok
|
Loaded 10000 queries.
|
||||||
|
@ -4,12 +4,12 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
. "$CURDIR"/../shell_config.sh
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
# Create a huge amount of tables, so Suggest will take a time to load
|
# Create a huge amount of tables, so Suggest will take a time to load
|
||||||
seq 1 1000 | sed -r -e 's/(.+)/CREATE TABLE IF NOT EXISTS test\1 (x UInt8) ENGINE = Memory;/' | ${CLICKHOUSE_CLIENT} -n
|
${CLICKHOUSE_CLIENT} -q "SELECT 'CREATE TABLE test_' || hex(randomPrintableASCII(40)) || '(x UInt8) Engine=Memory;' FROM numbers(10000)" --format=TSVRaw | ${CLICKHOUSE_BENCHMARK} -c32 -i 10000 -d 0 2>&1 | grep -F 'Loaded 10000 queries'
|
||||||
|
|
||||||
function stress()
|
function stress()
|
||||||
{
|
{
|
||||||
while true; do
|
while true; do
|
||||||
./"$CURDIR"/01526_client_start_and_exit.expect
|
./"$CURDIR"/01526_client_start_and_exit.expect | grep -v -P 'ClickHouse client|Connecting|Connected|:\) Bye\.|^\s*$|spawn bash|^0\s*$'
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,6 +20,3 @@ for _ in {1..10}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
wait
|
wait
|
||||||
echo 'Ok'
|
|
||||||
|
|
||||||
seq 1 1000 | sed -r -e 's/(.+)/DROP TABLE test\1;/' | ${CLICKHOUSE_CLIENT} -n
|
|
||||||
|
Loading…
Reference in New Issue
Block a user