Skip to content

Commit ddf961d

Browse files
committed
tests: update 00563_insert_into_remote_and_zookeeper_long
Found one todo and resolved it to make bugfix check work
1 parent 7750eee commit ddf961d

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
prefer_localhost_replica=1
2+
1
3+
2
4+
2
5+
prefer_localhost_replica=0
16
1
27
2
38
2
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
-- Tags: long, zookeeper
1+
-- Tags: zookeeper
22

33
-- Check that settings are correctly passed through Distributed table
44
DROP TABLE IF EXISTS simple;
55
CREATE TABLE simple (d Int8) ENGINE = ReplicatedMergeTree('/clickhouse/{database}/test_00563/tables/simple', '1') ORDER BY d;
66

7-
-- TODO: replace '127.0.0.2' -> '127.0.0.1' after a fix
8-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (1);
9-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (1);
10-
11-
SET insert_deduplicate=0;
12-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (2);
13-
INSERT INTO TABLE FUNCTION remote('127.0.0.2', currentDatabase(), 'simple') VALUES (2);
7+
SELECT 'prefer_localhost_replica=1';
8+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=1 VALUES (1);
9+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=1 VALUES (1);
10+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=0 VALUES (2);
11+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=1, insert_deduplicate=0 VALUES (2);
12+
SELECT * FROM remote('127.0.0.1', currentDatabase(), 'simple') ORDER BY d;
1413

14+
SELECT 'prefer_localhost_replica=0';
15+
TRUNCATE TABLE simple;
16+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=1 VALUES (1);
17+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=1 VALUES (1);
18+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=0 VALUES (2);
19+
INSERT INTO TABLE FUNCTION remote('127.0.0.1', currentDatabase(), 'simple') SETTINGS prefer_localhost_replica=0, insert_deduplicate=0 VALUES (2);
1520
SELECT * FROM remote('127.0.0.2', currentDatabase(), 'simple') ORDER BY d;
1621
DROP TABLE simple;

0 commit comments

Comments
 (0)