mirror of https://github.com/milvus-io/milvus.git
[test]modify the diskann testcase (#20782)
Signed-off-by: jingkl <jingjing.jia@zilliz.com> Signed-off-by: jingkl <jingjing.jia@zilliz.com>pull/20778/head
parent
925fa9d41d
commit
d2d72c1642
|
@ -3,7 +3,7 @@
|
|||
int total_timeout_minutes = 60 * 5
|
||||
int e2e_timeout_seconds = 70 * 60
|
||||
def imageTag=''
|
||||
int case_timeout_seconds = 10 * 60
|
||||
int case_timeout_seconds = 20 * 60
|
||||
def chart_version='3.2.13'
|
||||
pipeline {
|
||||
options {
|
||||
|
|
|
@ -13,7 +13,7 @@ from utils.util_log import test_log as log
|
|||
from pymilvus.orm.types import CONSISTENCY_STRONG
|
||||
from common.common_func import param_info
|
||||
|
||||
TIMEOUT = 20
|
||||
TIMEOUT = 120
|
||||
INDEX_NAME = ""
|
||||
|
||||
|
||||
|
@ -234,7 +234,7 @@ class ApiCollectionWrapper:
|
|||
|
||||
@trace()
|
||||
def create_index(self, field_name, index_params, index_name=None, check_task=None, check_items=None, **kwargs):
|
||||
disktimeout = 300
|
||||
disktimeout = 600
|
||||
timeout = kwargs.get("timeout", disktimeout * 2)
|
||||
index_name = INDEX_NAME if index_name is None else index_name
|
||||
index_name = kwargs.get("index_name", index_name)
|
||||
|
|
|
@ -14,7 +14,7 @@ class ApiIndexWrapper:
|
|||
|
||||
def init_index(self, collection, field_name, index_params, index_name=None, check_task=None, check_items=None,
|
||||
**kwargs):
|
||||
disktimeout = 300
|
||||
disktimeout = 600
|
||||
timeout = kwargs.get("timeout", disktimeout * 2)
|
||||
index_name = INDEX_NAME if index_name is None else index_name
|
||||
index_name = kwargs.get("index_name", index_name)
|
||||
|
|
|
@ -1567,7 +1567,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
def call_back(self):
|
||||
assert True
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_index_with_diskann_normal(self):
|
||||
"""
|
||||
target: test create index with diskann
|
||||
|
@ -1593,7 +1593,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
check_items={"nq": default_nq,
|
||||
"limit": default_limit})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_index_with_over_max_dim(self):
|
||||
"""
|
||||
target: test create index with diskann
|
||||
|
@ -1612,7 +1612,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
check_items={ct.err_code: 1,
|
||||
ct.err_msg: "invalid index params"})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_index_with_diskann_callback(self,_async):
|
||||
"""
|
||||
target: test create index with diskann
|
||||
|
@ -1641,7 +1641,8 @@ class TestIndexDiskann(TestcaseBase):
|
|||
check_task=CheckTasks.check_search_results,
|
||||
check_items={"nq": default_nq,
|
||||
"limit": default_limit})
|
||||
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_diskann_index_drop_with_async(self, _async):
|
||||
"""
|
||||
target: test create index interface
|
||||
|
@ -1662,7 +1663,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w.drop_index(index_name=ct.default_index_name)
|
||||
assert len(collection_w.indexes) == 0
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_diskann_index_with_partition(self):
|
||||
"""
|
||||
target: test create index with diskann
|
||||
|
@ -1689,7 +1690,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
assert collection_w.has_index(index_name=field_name)[0] == False
|
||||
assert len(collection_w.indexes) == 0
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_drop_diskann_index_with_noraml(self):
|
||||
"""
|
||||
target: test drop diskann index normal
|
||||
|
@ -1709,7 +1710,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w.drop_index(index_name=index_name1)
|
||||
assert collection_w.has_index(index_name=index_name1)[0] == False
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_drop_diskann_index_and_create_again(self):
|
||||
"""
|
||||
target: test drop diskann index normal
|
||||
|
@ -1731,7 +1732,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w.create_index(default_field_name, ct.default_diskann_index)
|
||||
assert len(collection_w.indexes) == 1
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_more_than_three_index(self):
|
||||
"""
|
||||
target: test create diskann index
|
||||
|
@ -1752,7 +1753,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w.create_index("float", default_params, index_name="c")
|
||||
assert collection_w.has_index(index_name="c")[0] == True
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_drop_diskann_index_with_partition(self):
|
||||
"""
|
||||
target: test drop diskann index normal
|
||||
|
@ -1775,7 +1776,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w.drop_index()
|
||||
assert len(collection_w.indexes) == 0
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_diskann_index_with_binary(self):
|
||||
"""
|
||||
target: test create diskann index with binary
|
||||
|
@ -1792,7 +1793,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
check_items={ct.err_code: 1,
|
||||
ct.err_msg: "field data type BinaryVector don't support the index build type DISKANN"})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_create_diskann_index_multithread(self):
|
||||
"""
|
||||
target: test create index interface with multiprocess
|
||||
|
|
|
@ -1678,8 +1678,7 @@ class TestqueryString(TestcaseBase):
|
|||
|
||||
assert len(res) == nb
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L0)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_query_with_create_diskann_index(self):
|
||||
"""
|
||||
target: test query after create diskann index
|
||||
|
@ -1698,8 +1697,7 @@ class TestqueryString(TestcaseBase):
|
|||
check_vec = vectors[0].iloc[:, [0]][0:len(int_values)].to_dict('records')
|
||||
collection_w.query(term_expr, check_task=CheckTasks.check_query_results, check_items={exp_res: check_vec})
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L0)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_query_with_create_diskann_with_string_pk(self):
|
||||
"""
|
||||
target: test query after create diskann index
|
||||
|
|
|
@ -4223,7 +4223,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
def _async(self, request):
|
||||
yield request.param
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_search_with_diskann_index(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4262,7 +4262,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
"_async": _async}
|
||||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("limit", [20])
|
||||
@pytest.mark.parametrize("search_list", [10, 201])
|
||||
def test_search_invalid_params_with_diskann_A(self, dim, auto_id, search_list, limit):
|
||||
|
@ -4293,7 +4293,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
"err_msg": "fail to search on all shard leaders"}
|
||||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("limit", [6553])
|
||||
@pytest.mark.parametrize("search_list", [6553, 65531])
|
||||
def test_search_invalid_params_with_diskann_B(self, dim, auto_id, search_list, limit):
|
||||
|
@ -4324,7 +4324,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
"err_msg": "fail to search on all shard leaders"}
|
||||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("limit", [6554])
|
||||
@pytest.mark.parametrize("search_list", [6554, 65536])
|
||||
def test_search_invalid_params_with_diskann_C(self, dim, auto_id, search_list, limit):
|
||||
|
@ -4354,7 +4354,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
check_items={"err_code": 1,
|
||||
"err_msg": "fail to search on all shard leaders"}
|
||||
)
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_search_with_diskann_with_string_pk(self, dim):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4386,7 +4386,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_search_with_delete_data(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4428,7 +4428,7 @@ class TestsearchDiskann(TestcaseBase):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
def test_search_with_diskann_and_more_index(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
|
Loading…
Reference in New Issue