Fix test with obsolete assumption

This commit is contained in:
Alexey Milovidov 2020-05-31 18:10:52 +03:00
parent 87cf123ef8
commit 5192ebdc23

View File

@ -24,18 +24,16 @@ def test_config_without_part_log(start_cluster):
node1.query("SYSTEM FLUSH LOGS") node1.query("SYSTEM FLUSH LOGS")
assert "Table system.part_log doesn't exist" in node1.query_and_get_error("SELECT * FROM system.part_log") assert "Table system.part_log doesn't exist" in node1.query_and_get_error("SELECT * FROM system.part_log")
# Note: if part_log is defined, we cannot say when the table will be created - because of metric_log, trace_log, text_log, query_log...
def test_config_with_standard_part_log(start_cluster): def test_config_with_standard_part_log(start_cluster):
assert "Table system.part_log doesn't exist" in node2.query_and_get_error("SELECT * FROM system.part_log")
node2.query("CREATE TABLE test_table(word String, value UInt64) ENGINE=MergeTree() Order by value") node2.query("CREATE TABLE test_table(word String, value UInt64) ENGINE=MergeTree() Order by value")
assert "Table system.part_log doesn't exist" in node2.query_and_get_error("SELECT * FROM system.part_log")
node2.query("INSERT INTO test_table VALUES ('name', 1)") node2.query("INSERT INTO test_table VALUES ('name', 1)")
node1.query("SYSTEM FLUSH LOGS") node1.query("SYSTEM FLUSH LOGS")
assert node2.query("SELECT * FROM system.part_log") != "" assert node2.query("SELECT * FROM system.part_log") != ""
def test_config_with_non_standard_part_log(start_cluster): def test_config_with_non_standard_part_log(start_cluster):
assert "Table system.table_name doesn't exist" in node3.query_and_get_error("SELECT * FROM system.table_name")
node3.query("CREATE TABLE test_table(word String, value UInt64) ENGINE=MergeTree() Order by value") node3.query("CREATE TABLE test_table(word String, value UInt64) ENGINE=MergeTree() Order by value")
assert "Table system.table_name doesn't exist" in node3.query_and_get_error("SELECT * FROM system.table_name")
node3.query("INSERT INTO test_table VALUES ('name', 1)") node3.query("INSERT INTO test_table VALUES ('name', 1)")
node1.query("SYSTEM FLUSH LOGS") node1.query("SYSTEM FLUSH LOGS")
assert node3.query("SELECT * FROM system.table_name") != "" assert node3.query("SELECT * FROM system.table_name") != ""