Set use_compact_format_in_distributed_parts_names=0 for some integration tests

To avoid depends from default.
This commit is contained in:
Azat Khuzhin 2020-11-06 08:34:37 +03:00
parent f379f9837d
commit ac8df08186
2 changed files with 15 additions and 7 deletions

View File

@ -47,10 +47,12 @@ def test_single_file(started_cluster, cluster):
def test_two_files(started_cluster, cluster):
node.query(
"create table test.distr_2 (x UInt64, s String) engine = Distributed('{}', database, table)".format(cluster))
node.query("insert into test.distr_2 values (0, '_'), (1, 'a')",
settings={"use_compact_format_in_distributed_parts_names": "1"})
node.query("insert into test.distr_2 values (2, 'bb'), (3, 'ccc')",
settings={"use_compact_format_in_distributed_parts_names": "1"})
node.query("insert into test.distr_2 values (0, '_'), (1, 'a')", settings={
"use_compact_format_in_distributed_parts_names": "1",
})
node.query("insert into test.distr_2 values (2, 'bb'), (3, 'ccc')", settings={
"use_compact_format_in_distributed_parts_names": "1",
})
query = "select * from file('/var/lib/clickhouse/data/test/distr_2/shard1_replica1/{1,2,3,4}.bin', 'Distributed') order by x"
out = node.exec_in_container(['/usr/bin/clickhouse', 'local', '--stacktrace', '-q', query])
@ -70,7 +72,9 @@ def test_two_files(started_cluster, cluster):
def test_single_file_old(started_cluster, cluster):
node.query(
"create table test.distr_3 (x UInt64, s String) engine = Distributed('{}', database, table)".format(cluster))
node.query("insert into test.distr_3 values (1, 'a'), (2, 'bb'), (3, 'ccc')")
node.query("insert into test.distr_3 values (1, 'a'), (2, 'bb'), (3, 'ccc')", settings={
"use_compact_format_in_distributed_parts_names": "0",
})
query = "select * from file('/var/lib/clickhouse/data/test/distr_3/default@not_existing:9000/1.bin', 'Distributed')"
out = node.exec_in_container(['/usr/bin/clickhouse', 'local', '--stacktrace', '-q', query])

View File

@ -48,7 +48,9 @@ def test_insert(start_cluster):
# manual only (but only for remote node)
node.query('SYSTEM STOP DISTRIBUTED SENDS test.dist_foo')
node.query('INSERT INTO test.dist_foo SELECT * FROM numbers(100)')
node.query('INSERT INTO test.dist_foo SELECT * FROM numbers(100)', settings={
'use_compact_format_in_distributed_parts_names': '0',
})
assert _files_in_dist_mon(node, 'disk1', 'dist_foo') == 1
assert _files_in_dist_mon(node, 'disk2', 'dist_foo') == 0
@ -61,7 +63,9 @@ def test_insert(start_cluster):
#
node.query('RENAME TABLE test.dist_foo TO test.dist2_foo')
node.query('INSERT INTO test.dist2_foo SELECT * FROM numbers(100)')
node.query('INSERT INTO test.dist2_foo SELECT * FROM numbers(100)', settings={
'use_compact_format_in_distributed_parts_names': '0',
})
assert _files_in_dist_mon(node, 'disk1', 'dist2_foo') == 0
assert _files_in_dist_mon(node, 'disk2', 'dist2_foo') == 1