Merge pull request #27785 from ClickHouse/fix_some_tests

Fix some tests
This commit is contained in:
tavplubix 2021-08-17 21:13:58 +03:00 committed by GitHub
commit 2fcc0874a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View File

@ -101,14 +101,12 @@ timeout $TIMEOUT bash -c test_func 2> /dev/null &
wait
sleep 1
${CLICKHOUSE_CLIENT} -n -q "
DROP TABLE IF EXISTS $CURR_DATABASE.log;
DROP TABLE IF EXISTS $CURR_DATABASE.slog;
DROP TABLE IF EXISTS $CURR_DATABASE.tlog;
DROP TABLE IF EXISTS $CURR_DATABASE.tlog2;
"
for table in log tlog slog tlog2; do
$CLICKHOUSE_CLIENT -q "SYSTEM STOP TTL MERGES $CURR_DATABASE.$table" >& /dev/null
${CLICKHOUSE_CLIENT} -q "ATTACH TABLE $CURR_DATABASE.$table;" 2>/dev/null
done
${CLICKHOUSE_CLIENT} -q "DROP DATABASE $CURR_DATABASE"
$CLICKHOUSE_CLIENT -q "SYSTEM START TTL MERGES";
echo "Test OK"
# TODO: doesn't work! $CLICKHOUSE_CLIENT -q "DROP DATABASE $CURR_DATABASE"

View File

@ -11,11 +11,9 @@ create table db_01294.dist_01294 as system.one engine=Distributed(test_shard_loc
system flush distributed db_01294.dist_01294;
system flush distributed on cluster test_shard_localhost db_01294.dist_01294;
-- stop
system stop distributed sends;
system stop distributed sends db_01294.dist_01294;
system stop distributed sends on cluster test_shard_localhost db_01294.dist_01294;
-- start
system start distributed sends;
system start distributed sends db_01294.dist_01294;
system start distributed sends on cluster test_shard_localhost db_01294.dist_01294;

View File

@ -4,7 +4,8 @@ DROP TABLE IF EXISTS r2;
CREATE TABLE r1 (x String) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/r', 'r1') ORDER BY x;
CREATE TABLE r2 (x String) ENGINE = ReplicatedMergeTree('/clickhouse/tables/{database}/r', 'r2') ORDER BY x;
SYSTEM STOP REPLICATED SENDS;
SYSTEM STOP REPLICATED SENDS r1;
SYSTEM STOP REPLICATED SENDS r2;
INSERT INTO r1 VALUES ('Hello, world');
SELECT * FROM r1;
@ -14,7 +15,8 @@ SELECT '---';
SELECT * FROM r1;
SELECT * FROM r2;
SYSTEM START REPLICATED SENDS;
SYSTEM START REPLICATED SENDS r1;
SYSTEM START REPLICATED SENDS r2;
SYSTEM SYNC REPLICA r1;
SYSTEM SYNC REPLICA r2;