mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
fix test case format
This commit is contained in:
parent
6153bd453b
commit
4fdd0c37a5
@ -8,7 +8,8 @@ cluster = ClickHouseCluster(__file__)
|
||||
node = cluster.add_instance(
|
||||
"node",
|
||||
main_configs=["configs/zookeeper_config.xml", "configs/merge_tree.xml"],
|
||||
with_zookeeper=True)
|
||||
with_zookeeper=True,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@ -29,11 +30,15 @@ def test_without_auto_optimize_merge_tree(start_cluster):
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
expected = TSV('''3\n''')
|
||||
assert TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)) == expected
|
||||
expected = TSV("""3\n""")
|
||||
assert (
|
||||
TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)
|
||||
)
|
||||
== expected
|
||||
)
|
||||
|
||||
node.query("DROP TABLE test;")
|
||||
|
||||
@ -48,11 +53,15 @@ def test_auto_optimize_merge_tree(start_cluster):
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
expected = TSV('''1\n''')
|
||||
assert TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)) == expected
|
||||
expected = TSV("""1\n""")
|
||||
assert (
|
||||
TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)
|
||||
)
|
||||
== expected
|
||||
)
|
||||
|
||||
node.query("DROP TABLE test;")
|
||||
|
||||
@ -67,10 +76,14 @@ def test_auto_optimize_replicated_merge_tree(start_cluster):
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
expected = TSV('''1\n''')
|
||||
assert TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)) == expected
|
||||
expected = TSV("""1\n""")
|
||||
assert (
|
||||
TSV(
|
||||
node.query(
|
||||
"SELECT count(*) FROM system.parts where table='test' and active=1"
|
||||
)
|
||||
)
|
||||
== expected
|
||||
)
|
||||
|
||||
node.query("DROP TABLE test;")
|
||||
|
Loading…
Reference in New Issue
Block a user