From 09aff5283014ab5d25b2fc4cdc67831ea22b4037 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 2 Mar 2020 01:35:16 +0300 Subject: [PATCH] Remove too short timeouts from tests (they may lead to false positives) --- dbms/tests/queries/0_stateless/00090_union_race_conditions_1.sh | 2 +- dbms/tests/queries/0_stateless/00091_union_race_conditions_2.sh | 2 +- dbms/tests/queries/0_stateless/00092_union_race_conditions_3.sh | 2 +- dbms/tests/queries/0_stateless/00093_union_race_conditions_4.sh | 2 +- dbms/tests/queries/0_stateless/00094_union_race_conditions_5.sh | 2 +- .../queries/0_stateless/01013_sync_replica_timeout_zookeeper.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dbms/tests/queries/0_stateless/00090_union_race_conditions_1.sh b/dbms/tests/queries/0_stateless/00090_union_race_conditions_1.sh index b996f0d58f2..ab8b89daa6d 100755 --- a/dbms/tests/queries/0_stateless/00090_union_race_conditions_1.sh +++ b/dbms/tests/queries/0_stateless/00090_union_race_conditions_1.sh @@ -13,6 +13,6 @@ echo " INSERT INTO two_blocks VALUES ('2000-01-02'); " | $CLICKHOUSE_CLIENT -n -for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM two_blocks);/' | $CLICKHOUSE_CLIENT -n --receive_timeout=1 | grep -vE '^2$' && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM two_blocks);/' | $CLICKHOUSE_CLIENT -n | grep -vE '^2$' && echo 'Fail!' && break; echo -n '.'; done; echo echo "DROP TABLE two_blocks;" | $CLICKHOUSE_CLIENT -n diff --git a/dbms/tests/queries/0_stateless/00091_union_race_conditions_2.sh b/dbms/tests/queries/0_stateless/00091_union_race_conditions_2.sh index af7e1c25dd5..8018debb6b9 100755 --- a/dbms/tests/queries/0_stateless/00091_union_race_conditions_2.sh +++ b/dbms/tests/queries/0_stateless/00091_union_race_conditions_2.sh @@ -6,4 +6,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) set -o errexit set -o pipefail -for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55);/' | $CLICKHOUSE_CLIENT -n --receive_timeout=1 --max_block_size=1 | grep -vE '^55$' && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT count() FROM (SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55);/' | $CLICKHOUSE_CLIENT -n --max_block_size=1 | grep -vE '^55$' && echo 'Fail!' && break; echo -n '.'; done; echo diff --git a/dbms/tests/queries/0_stateless/00092_union_race_conditions_3.sh b/dbms/tests/queries/0_stateless/00092_union_race_conditions_3.sh index bd28a69be58..7958d11e35b 100755 --- a/dbms/tests/queries/0_stateless/00092_union_race_conditions_3.sh +++ b/dbms/tests/queries/0_stateless/00092_union_race_conditions_3.sh @@ -6,4 +6,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) set -o errexit set -o pipefail -for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55;/' | $CLICKHOUSE_CLIENT -n --receive_timeout=1 --max_block_size=1 | wc -l | grep -vE '^5500$' && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM (SELECT * FROM system.numbers_mt LIMIT 111) LIMIT 55;/' | $CLICKHOUSE_CLIENT -n --max_block_size=1 | wc -l | grep -vE '^5500$' && echo 'Fail!' && break; echo -n '.'; done; echo diff --git a/dbms/tests/queries/0_stateless/00093_union_race_conditions_4.sh b/dbms/tests/queries/0_stateless/00093_union_race_conditions_4.sh index 2d255a0c2f6..0554124c36f 100755 --- a/dbms/tests/queries/0_stateless/00093_union_race_conditions_4.sh +++ b/dbms/tests/queries/0_stateless/00093_union_race_conditions_4.sh @@ -6,4 +6,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) set -o errexit set -o pipefail -for i in {1..10}; do seq 1 10 | sed 's/.*/SELECT 1 % ((number + 500) % 1000) FROM numbers_mt(1000);/' | $CLICKHOUSE_CLIENT -n --receive_timeout=1 --max_block_size=1 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 10 | sed 's/.*/SELECT 1 % ((number + 500) % 1000) FROM numbers_mt(1000);/' | $CLICKHOUSE_CLIENT -n --max_block_size=1 >/dev/null 2>&1 && echo 'Fail!' && break; echo -n '.'; done; echo diff --git a/dbms/tests/queries/0_stateless/00094_union_race_conditions_5.sh b/dbms/tests/queries/0_stateless/00094_union_race_conditions_5.sh index a0fe4badec6..ed773ae05f8 100755 --- a/dbms/tests/queries/0_stateless/00094_union_race_conditions_5.sh +++ b/dbms/tests/queries/0_stateless/00094_union_race_conditions_5.sh @@ -6,4 +6,4 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) set -o errexit set -o pipefail -for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM system.numbers_mt LIMIT 111;/' | $CLICKHOUSE_CLIENT -n --receive_timeout=1 --max_block_size=$(($RANDOM % 123 + 1)) | wc -l | grep -vE '^11100$' && echo 'Fail!' && break; echo -n '.'; done; echo +for i in {1..10}; do seq 1 100 | sed 's/.*/SELECT * FROM system.numbers_mt LIMIT 111;/' | $CLICKHOUSE_CLIENT -n --max_block_size=$(($RANDOM % 123 + 1)) | wc -l | grep -vE '^11100$' && echo 'Fail!' && break; echo -n '.'; done; echo diff --git a/dbms/tests/queries/0_stateless/01013_sync_replica_timeout_zookeeper.sh b/dbms/tests/queries/0_stateless/01013_sync_replica_timeout_zookeeper.sh index 9e846b42591..8c5bc2bdcd6 100755 --- a/dbms/tests/queries/0_stateless/01013_sync_replica_timeout_zookeeper.sh +++ b/dbms/tests/queries/0_stateless/01013_sync_replica_timeout_zookeeper.sh @@ -19,7 +19,7 @@ ${CLICKHOUSE_CLIENT} -n -q " " timeout 10s ${CLICKHOUSE_CLIENT} -n -q " - SET receive_timeout=1; + SET receive_timeout=60; SYSTEM SYNC REPLICA $R2 " 2>&1 | fgrep -q "DB::Exception: SYNC REPLICA ${CLICKHOUSE_DATABASE}.$R2: command timed out!" && echo 'OK' || echo 'Failed!'