mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Tidy the test file
This commit is contained in:
parent
588d5532e5
commit
860587c6c0
@ -43,33 +43,29 @@ def test_stop_waiting_for_offline_hosts(started_cluster):
|
||||
)
|
||||
assert time.time() - start < timeout
|
||||
|
||||
start = time.time()
|
||||
node1.query(
|
||||
"CREATE TABLE test_table ON CLUSTER test_cluster (x Int) Engine=Memory",
|
||||
settings=settings,
|
||||
)
|
||||
assert time.time() - start < timeout
|
||||
|
||||
node4.stop()
|
||||
|
||||
start = time.time()
|
||||
with pytest.raises(Exception) as err:
|
||||
node1.query(
|
||||
"DROP TABLE IF EXISTS test_table ON CLUSTER test_cluster SYNC",
|
||||
settings=settings,
|
||||
)
|
||||
assert "Return code: 159" in str(err.value)
|
||||
assert "Code: 159. DB::Exception" in node1.query_and_get_error(
|
||||
"DROP TABLE IF EXISTS test_table ON CLUSTER test_cluster SYNC",
|
||||
settings=settings,
|
||||
)
|
||||
|
||||
assert time.time() - start >= timeout
|
||||
|
||||
start = time.time()
|
||||
with pytest.raises(Exception) as err:
|
||||
node1.query(
|
||||
"CREATE TABLE test_table ON CLUSTER test_cluster (x Int) Engine=Memory",
|
||||
settings=settings,
|
||||
)
|
||||
assert "Return code: 159" in str(err.value)
|
||||
assert "Code: 159. DB::Exception" in node1.query_and_get_error(
|
||||
"CREATE TABLE test_table ON CLUSTER test_cluster (x Int) Engine=Memory",
|
||||
settings=settings,
|
||||
)
|
||||
assert time.time() - start >= timeout
|
||||
|
||||
# set `distributed_ddl_output_mode` = `throw_only_active``
|
||||
settings = {
|
||||
"distributed_ddl_task_timeout": timeout,
|
||||
"distributed_ddl_output_mode": "throw_only_active",
|
||||
|
Loading…
Reference in New Issue
Block a user