未验证 提交 b4dfcae0 编写于 作者: T ThreadDao 提交者: GitHub

[skip ci] Add delete partition case (#10227)

Signed-off-by: NThreadDao <yufen.zong@zilliz.com>
上级 fd6f1e54
......@@ -358,6 +358,7 @@ class TestDeleteOperation(TestcaseBase):
assert del_res.delete_cnt == 1
assert collection_w.num_entities == tmp_nb - 1
@pytest.mark.tags(CaseLabel.L1)
def test_delete_duplicate_primary_keys(self):
"""
target: test delete from duplicate primary keys
......@@ -374,3 +375,17 @@ class TestDeleteOperation(TestcaseBase):
del_res, _ = collection_w.delete(tmp_expr)
assert del_res.delete_cnt == tmp_nb
assert collection_w.is_empty
@pytest.mark.tags(CaseLabel.L2)
def test_delete_empty_partition(self):
"""
target: test delete empty partition
method: delete from an empty partition
expected: raise exception
"""
# init collection and partition
collection_w = self.init_collection_wrap(name=cf.gen_unique_str(prefix))
partition_w = self.init_partition_wrap(collection_wrap=collection_w)
error = {ct.err_code: 0, ct.err_msg: "..."}
collection_w.delete(tmp_expr, partition_name=[partition_w.name], check_task=CheckTasks.err_res, check_items=error)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册