move test script that caused a crash from bugs/ to tests

This commit is contained in:
Alexey Zatelepin 2019-03-07 21:16:36 +03:00
parent 3344955154
commit f7217d99dd
3 changed files with 22 additions and 18 deletions

View File

@ -0,0 +1 @@
did not crash

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
echo "DROP TABLE IF EXISTS test.concurrent_alter_column" | ${CLICKHOUSE_CLIENT}
echo "CREATE TABLE test.concurrent_alter_column (ts DATETIME) ENGINE = MergeTree PARTITION BY toStartOfDay(ts) ORDER BY tuple()" | ${CLICKHOUSE_CLIENT}
for i in {1..500}; do echo "ALTER TABLE test.concurrent_alter_column ADD COLUMN c$i DOUBLE;"; done | ${CLICKHOUSE_CLIENT} -n
for i in {1..100}; do echo "ALTER TABLE test.concurrent_alter_column ADD COLUMN d DOUBLE" | ${CLICKHOUSE_CLIENT}; sleep `echo 0.0$RANDOM`; echo "ALTER TABLE test.concurrent_alter_column DROP COLUMN d" | ${CLICKHOUSE_CLIENT} -n; done &
for i in {1..100}; do echo "ALTER TABLE test.concurrent_alter_column ADD COLUMN e DOUBLE" | ${CLICKHOUSE_CLIENT}; sleep `echo 0.0$RANDOM`; echo "ALTER TABLE test.concurrent_alter_column DROP COLUMN e" | ${CLICKHOUSE_CLIENT} -n; done &
for i in {1..100}; do echo "ALTER TABLE test.concurrent_alter_column ADD COLUMN f DOUBLE" | ${CLICKHOUSE_CLIENT}; sleep `echo 0.0$RANDOM`; echo "ALTER TABLE test.concurrent_alter_column DROP COLUMN f" | ${CLICKHOUSE_CLIENT} -n; done &
wait
echo "DROP TABLE test.concurrent_alter_column" | ${CLICKHOUSE_CLIENT}
echo 'did not crash'

View File

@ -1,18 +0,0 @@
#!/usr/bin/env bash
set -e
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
echo "DROP TABLE IF EXISTS test.test" | ${CLICKHOUSE_CLIENT}
echo "CREATE TABLE test.test (ts DATETIME) ENGINE = MergeTree PARTITION BY toStartOfDay(ts) ORDER BY tuple()" | ${CLICKHOUSE_CLIENT}
for i in {1..500}; do echo "ALTER TABLE test.test ADD COLUMN c$i DOUBLE;"; done | ${CLICKHOUSE_CLIENT} -n
for i in {1..500}; do echo "ALTER TABLE test.test ADD COLUMN d DOUBLE" | ${CLICKHOUSE_CLIENT}; echo "ALTER TABLE test.test DROP COLUMN d" | ${CLICKHOUSE_CLIENT} -n; done &
for i in {1..500}; do echo "ALTER TABLE test.test ADD COLUMN e DOUBLE" | ${CLICKHOUSE_CLIENT}; echo "ALTER TABLE test.test DROP COLUMN e" | ${CLICKHOUSE_CLIENT} -n; done &
wait
echo "DROP TABLE test.test" | ${CLICKHOUSE_CLIENT}