fix tests

This commit is contained in:
Anton Popov 2020-09-18 03:05:51 +03:00
parent 8e9828d2ff
commit d1e90e0e4b
2 changed files with 3 additions and 36 deletions

View File

@ -274,7 +274,6 @@ def test_mixed_granularity_single_node(start_dynamic_cluster, node):
"INSERT INTO table_with_default_granularity VALUES (toDate('2018-09-01'), 1, 333), (toDate('2018-09-02'), 2, 444)")
def callback(n):
<<<<<<< HEAD
new_config = """
<yandex><merge_tree>
<enable_mixed_granularity_parts>1</enable_mixed_granularity_parts>
@ -283,12 +282,6 @@ def test_mixed_granularity_single_node(start_dynamic_cluster, node):
n.replace_config("/etc/clickhouse-server/merge_tree_settings.xml", new_config)
n.replace_config("/etc/clickhouse-server/config.d/merge_tree_settings.xml", new_config)
=======
n.replace_config("/etc/clickhouse-server/merge_tree_settings.xml",
"<yandex><merge_tree><enable_mixed_granularity_parts>1</enable_mixed_granularity_parts></merge_tree></yandex>")
n.replace_config("/etc/clickhouse-server/config.d/merge_tree_settings.xml",
"<yandex><merge_tree><enable_mixed_granularity_parts>1</enable_mixed_granularity_parts></merge_tree></yandex>")
>>>>>>> upstream/master
node.restart_with_latest_version(callback_onstop=callback)
node.query("SYSTEM RELOAD CONFIG")
@ -331,7 +324,6 @@ def test_version_update_two_nodes(start_dynamic_cluster):
assert node12.query("SELECT COUNT() FROM table_with_default_granularity") == '2\n'
def callback(n):
<<<<<<< HEAD
new_config = """
<yandex><merge_tree>
<enable_mixed_granularity_parts>0</enable_mixed_granularity_parts>
@ -340,12 +332,6 @@ def test_version_update_two_nodes(start_dynamic_cluster):
n.replace_config("/etc/clickhouse-server/merge_tree_settings.xml", new_config)
n.replace_config("/etc/clickhouse-server/config.d/merge_tree_settings.xml", new_config)
=======
n.replace_config("/etc/clickhouse-server/merge_tree_settings.xml",
"<yandex><merge_tree><enable_mixed_granularity_parts>0</enable_mixed_granularity_parts></merge_tree></yandex>")
n.replace_config("/etc/clickhouse-server/config.d/merge_tree_settings.xml",
"<yandex><merge_tree><enable_mixed_granularity_parts>0</enable_mixed_granularity_parts></merge_tree></yandex>")
>>>>>>> upstream/master
node12.restart_with_latest_version(callback_onstop=callback)

View File

@ -55,20 +55,12 @@ def test_merge_with_ttl_timeout(started_cluster):
drop_table([node1, node2], table)
for node in [node1, node2]:
node.query(
<<<<<<< HEAD
'''
CREATE TABLE {table}(date DateTime, id UInt32, a Int32 TTL date + INTERVAL 1 DAY, b Int32 TTL date + INTERVAL 1 MONTH)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/{table}', '{replica}')
ORDER BY id PARTITION BY toDayOfMonth(date)
SETTINGS min_bytes_for_wide_part=0;
'''.format(replica=node.name, table=table))
=======
'''
CREATE TABLE {table}(date DateTime, id UInt32, a Int32 TTL date + INTERVAL 1 DAY, b Int32 TTL date + INTERVAL 1 MONTH)
ENGINE = ReplicatedMergeTree('/clickhouse/tables/test/{table}', '{replica}')
ORDER BY id PARTITION BY toDayOfMonth(date);
ORDER BY id PARTITION BY toDayOfMonth(date)
SETTINGS min_bytes_for_wide_part=0;
'''.format(replica=node.name, table=table))
>>>>>>> upstream/master
node1.query("SYSTEM STOP TTL MERGES {table}".format(table=table))
node2.query("SYSTEM STOP TTL MERGES {table}".format(table=table))
@ -256,17 +248,6 @@ limitations under the License."""
time.sleep(0.5)
node1.query(
<<<<<<< HEAD
"""
CREATE TABLE {name} (
s1 String,
d1 DateTime
) ENGINE = {engine}
ORDER BY tuple()
TTL d1 + INTERVAL 1 DAY DELETE
SETTINGS min_bytes_for_wide_part=0
""".format(name=name, engine=engine))
=======
"""
CREATE TABLE {name} (
s1 String,
@ -274,8 +255,8 @@ limitations under the License."""
) ENGINE = {engine}
ORDER BY tuple()
TTL d1 + INTERVAL 1 DAY DELETE
SETTINGS min_bytes_for_wide_part=0
""".format(name=name, engine=engine))
>>>>>>> upstream/master
node1.query("""ALTER TABLE {name} MODIFY COLUMN s1 String TTL d1 + INTERVAL 1 SECOND""".format(name=name))
node1.query("""ALTER TABLE {name} ADD COLUMN b1 Int32""".format(name=name))