mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 12:22:12 +00:00
Adjust the tests to do less work
This commit is contained in:
parent
c5b09b4907
commit
662b5d40e9
@ -1,10 +1,6 @@
|
|||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
30 0 54 810
|
||||||
100 0 99 4950
|
|
||||||
100 0 99 4950
|
|
||||||
100 0 99 4950
|
|
||||||
100 0 99 4950
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Tags: long, no-replicated-database, no-parallel
|
# Tags: long, no-replicated-database
|
||||||
# Tag no-replicated-database: Fails due to additional replicas or shards
|
# Tag no-replicated-database: Fails due to additional replicas or shards
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
@ -8,7 +8,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
. "$CURDIR"/../shell_config.sh
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
NUM_REPLICAS=10
|
NUM_REPLICAS=6
|
||||||
|
|
||||||
for i in $(seq 1 $NUM_REPLICAS); do
|
for i in $(seq 1 $NUM_REPLICAS); do
|
||||||
$CLICKHOUSE_CLIENT -n -q "
|
$CLICKHOUSE_CLIENT -n -q "
|
||||||
@ -20,17 +20,17 @@ done
|
|||||||
function thread {
|
function thread {
|
||||||
i=0 retries=300
|
i=0 retries=300
|
||||||
while [[ $i -lt $retries ]]; do # server can be dead
|
while [[ $i -lt $retries ]]; do # server can be dead
|
||||||
$CLICKHOUSE_CLIENT --insert_quorum 5 --insert_quorum_parallel 1 --query "INSERT INTO r$1 SELECT $2" && break
|
$CLICKHOUSE_CLIENT --insert_quorum 3 --insert_quorum_parallel 1 --query "INSERT INTO r$1 SELECT $2" && break
|
||||||
((++i))
|
((++i))
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in $(seq 1 $NUM_REPLICAS); do
|
for i in $(seq 1 $NUM_REPLICAS); do
|
||||||
for j in {0..9}; do
|
for j in {0..4}; do
|
||||||
a=$((($i - 1) * 10 + $j))
|
a=$((($i - 1) * 10 + $j))
|
||||||
|
|
||||||
# Note: making 100 connections simultaneously is a mini-DoS when server is build with sanitizers and CI environment is overloaded.
|
# Note: making 30 connections simultaneously is a mini-DoS when server is build with sanitizers and CI environment is overloaded.
|
||||||
# That's why we repeat "socket timeout" errors.
|
# That's why we repeat "socket timeout" errors.
|
||||||
thread $i $a 2>&1 | grep -v -P 'SOCKET_TIMEOUT|NETWORK_ERROR|^$' &
|
thread $i $a 2>&1 | grep -v -P 'SOCKET_TIMEOUT|NETWORK_ERROR|^$' &
|
||||||
done
|
done
|
||||||
@ -46,5 +46,5 @@ for i in $(seq 1 $NUM_REPLICAS); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
for i in $(seq 1 $NUM_REPLICAS); do
|
for i in $(seq 1 $NUM_REPLICAS); do
|
||||||
$CLICKHOUSE_CLIENT -n -q "DROP TABLE IF EXISTS r$i;"
|
$CLICKHOUSE_CLIENT -n -q "DROP TABLE IF EXISTS r$i SYNC;"
|
||||||
done
|
done
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Tags: long, deadlock, no-parallel
|
# Tags: long, deadlock
|
||||||
|
|
||||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
@ -29,7 +29,7 @@ populate_table_bg () {
|
|||||||
$CLICKHOUSE_CLIENT --query "
|
$CLICKHOUSE_CLIENT --query "
|
||||||
INSERT INTO join_block_test
|
INSERT INTO join_block_test
|
||||||
SELECT toString(number) as id, number * number as num
|
SELECT toString(number) as id, number * number as num
|
||||||
FROM system.numbers LIMIT 3000000
|
FROM system.numbers LIMIT 500000
|
||||||
" >/dev/null
|
" >/dev/null
|
||||||
) &
|
) &
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user