From d283870f3d84423323653c26cacceb59daf2281b Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Thu, 6 May 2021 01:14:32 +0300 Subject: [PATCH] Fix test that depends on configuration too much --- .../0_stateless/01018_Distributed__shard_num.reference | 4 ++-- tests/queries/0_stateless/01018_Distributed__shard_num.sql | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/queries/0_stateless/01018_Distributed__shard_num.reference b/tests/queries/0_stateless/01018_Distributed__shard_num.reference index f4b92011759..b2c8b77554b 100644 --- a/tests/queries/0_stateless/01018_Distributed__shard_num.reference +++ b/tests/queries/0_stateless/01018_Distributed__shard_num.reference @@ -27,8 +27,8 @@ remote(Distributed) 1 100 1 100 JOIN system.clusters -1 10 localhost ::1 9000 -1 20 localhost ::1 9000 +1 10 localhost 1 9000 +1 20 localhost 1 9000 dist_3 100 foo foo 100 foo diff --git a/tests/queries/0_stateless/01018_Distributed__shard_num.sql b/tests/queries/0_stateless/01018_Distributed__shard_num.sql index f6d5f23eca8..7d4aaf42473 100644 --- a/tests/queries/0_stateless/01018_Distributed__shard_num.sql +++ b/tests/queries/0_stateless/01018_Distributed__shard_num.sql @@ -43,13 +43,13 @@ SELECT _shard_num, key FROM remote('127.0.0.1', currentDatabase(), dist_2) order -- JOIN system.clusters SELECT 'JOIN system.clusters'; -SELECT a._shard_num, a.key, b.host_name, b.host_address, b.port +SELECT a._shard_num, a.key, b.host_name, b.host_address IN ('::1', '127.0.0.1'), b.port FROM (SELECT *, _shard_num FROM dist_1) a JOIN system.clusters b ON a._shard_num = b.shard_num WHERE b.cluster = 'test_cluster_two_shards_localhost'; -SELECT _shard_num, key, b.host_name, b.host_address, b.port +SELECT _shard_num, key, b.host_name, b.host_address IN ('::1', '127.0.0.1'), b.port FROM dist_1 a JOIN system.clusters b ON _shard_num = b.shard_num @@ -58,7 +58,7 @@ WHERE b.cluster = 'test_cluster_two_shards_localhost'; -- { serverError 403 } -- rewrite does not work with aliases, hence Missing columns (47) SELECT a._shard_num, key FROM dist_1 a; -- { serverError 47; } -- the same with JOIN, just in case -SELECT a._shard_num, a.key, b.host_name, b.host_address, b.port +SELECT a._shard_num, a.key, b.host_name, b.host_address IN ('::1', '127.0.0.1'), b.port FROM dist_1 a JOIN system.clusters b ON a._shard_num = b.shard_num