mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 10:59:32 +08:00
test: modify test cases for error msg update (#28846)
#23075 Signed-off-by: nico <cheng.yuan@zilliz.com>
This commit is contained in:
parent
8740adbe28
commit
cbd3b3c836
@ -3301,11 +3301,10 @@ class TestLoadPartition(TestcaseBase):
|
||||
description=description,
|
||||
check_task=CheckTasks.check_partition_property,
|
||||
check_items={"name": partition_name, "description": description,
|
||||
"is_empty": True, "num_entities": 0}
|
||||
)
|
||||
"is_empty": True, "num_entities": 0})
|
||||
collection_w.create_index(ct.default_float_vec_field_name, index_params=ct.default_flat_index)
|
||||
partition_w.drop()
|
||||
error = {ct.err_code: 1, ct.err_msg: 'partitionID of partitionName:%s can not be find' % partition_name}
|
||||
error = {ct.err_code: 200, ct.err_msg: 'partition not found[partition=%s]' % partition_name}
|
||||
partition_w.load(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L0)
|
||||
@ -3323,8 +3322,7 @@ class TestLoadPartition(TestcaseBase):
|
||||
description=description,
|
||||
check_task=CheckTasks.check_partition_property,
|
||||
check_items={"name": partition_name, "description": description,
|
||||
"is_empty": True, "num_entities": 0}
|
||||
)
|
||||
"is_empty": True, "num_entities": 0})
|
||||
partition_w.release()
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@ -3342,10 +3340,10 @@ class TestLoadPartition(TestcaseBase):
|
||||
description=description,
|
||||
check_task=CheckTasks.check_partition_property,
|
||||
check_items={"name": partition_name, "description": description,
|
||||
"is_empty": True, "num_entities": 0}
|
||||
)
|
||||
"is_empty": True, "num_entities": 0})
|
||||
partition_w.drop()
|
||||
error = {ct.err_code: 1, ct.err_msg: 'Partition %s not exist.' % partition_name}
|
||||
collection_w.create_index(ct.default_float_vec_field_name)
|
||||
error = {ct.err_code: 200, ct.err_msg: 'partition not found[partition=%s]' % partition_name}
|
||||
partition_w.load(check_task=CheckTasks.err_res, check_items=error)
|
||||
partition_w.release(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
||||
@ -3385,8 +3383,7 @@ class TestLoadPartition(TestcaseBase):
|
||||
description=description,
|
||||
check_task=CheckTasks.check_partition_property,
|
||||
check_items={"name": partition_name, "description": description,
|
||||
"is_empty": True, "num_entities": 0}
|
||||
)
|
||||
"is_empty": True, "num_entities": 0})
|
||||
collection_w.drop()
|
||||
error = {ct.err_code: 0, ct.err_msg: "collection not found"}
|
||||
partition_w.load(check_task=CheckTasks.err_res, check_items=error)
|
||||
|
@ -833,7 +833,8 @@ class TestPartitionOperations(TestcaseBase):
|
||||
|
||||
# release the dropped partition and check err response
|
||||
partition_w.release(check_task=CheckTasks.err_res,
|
||||
check_items={ct.err_code: 1, ct.err_msg: PartitionErrorMessage.PartitionNotExist})
|
||||
check_items={ct.err_code: 200, ct.err_msg: "partition not found"
|
||||
"[partition=%s]" % partition_w.name})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_partition_release_dropped_collection(self):
|
||||
@ -1345,9 +1346,8 @@ class TestDropBase(TestcaseBase):
|
||||
|
||||
# check that the partition not exists
|
||||
assert not collection_w.has_partition(partition_name)[0]
|
||||
|
||||
collection_w.drop_partition(partition_w.name, check_task=CheckTasks.err_res,
|
||||
check_items={ct.err_code: 1, 'err_msg': "Partition not exist"})
|
||||
# now drop a non-existing partition will not raise error
|
||||
collection_w.drop_partition(partition_name)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L0)
|
||||
def test_drop_partition_create(self):
|
||||
|
Loading…
Reference in New Issue
Block a user