From 97f674cff0e7eed1419b1265a63a12995b3abf2b Mon Sep 17 00:00:00 2001 From: NicoYuan1986 <109071306+NicoYuan1986@users.noreply.github.com> Date: Fri, 21 Oct 2022 17:09:32 +0800 Subject: [PATCH] Add test case of indexes (#19973) Signed-off-by: nico Signed-off-by: nico --- tests/python_client/testcases/test_index.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/python_client/testcases/test_index.py b/tests/python_client/testcases/test_index.py index 2d128fd6f3..e6459b8547 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -214,6 +214,19 @@ class TestIndexOperation(TestcaseBase): assert len(collection_w.indexes) == 1 assert collection_w.indexes[0].params["index_type"] == default_index_params["index_type"] + @pytest.mark.tags(CaseLabel.L1) + @pytest.mark.xfail(reason="issue 19972") + def test_index_create_indexes_for_different_fields(self): + """ + target: Test create indexes for different fields + method: create two different indexes + expected: create successfully + """ + collection_w = self.init_collection_general(prefix, True, is_index=True)[0] + default_index = {"index_type": "IVF_FLAT", "params": {"nlist": 128}, "metric_type": "L2"} + collection_w.create_index(default_field_name, default_index) + collection_w.create_index(ct.default_int64_field_name, {}) + @pytest.mark.tags(CaseLabel.L1) def test_index_collection_empty(self): """