From af0769139474c2ba4e658a4fd7814f6a7ca3d1d2 Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Fri, 15 Oct 2021 20:46:33 +0800 Subject: [PATCH] [skip ci] Add skipped delete case (#9996) Signed-off-by: ThreadDao --- .../python_client/testcases/test_delete_20.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/python_client/testcases/test_delete_20.py b/tests/python_client/testcases/test_delete_20.py index 5b8ad67577..576321df94 100644 --- a/tests/python_client/testcases/test_delete_20.py +++ b/tests/python_client/testcases/test_delete_20.py @@ -166,3 +166,23 @@ class TestDeleteOperation(TestcaseBase): # raise exception error = {ct.err_code: 0, ct.err_msg: "..."} collection_w.delete(expr=tmp_expr, check_task=CheckTasks.err_res, check_items=error) + + @pytest.mark.skip(reason="Delete function is not implemented") + @pytest.mark.tags(CaseLabel.L1) + def test_delete_after_index(self): + """ + target: test delete after creating index + method: 1.create index 2.delete entities + expected: assert index and num entities + """ + # init collection with nb default data + collection_w = self.init_collection_general(prefix, nb=tmp_nb, insert_data=True)[0] + + # create index + index_params = {"index_type": "IVF_SQ8", "metric_type": "L2", "params": {"nlist": 64}} + collection_w.create_index(ct.default_float_vec_field_name, index_params) + assert collection_w.has_index()[0] + # delete entity + collection_w.delete(tmp_expr) + assert collection_w.num_entities == tmp_nb - 1 + assert collection_w.has_index()