mirror of https://github.com/milvus-io/milvus.git
[test]modify the diskann testcase (#20728)
Signed-off-by: jingkl <jingjing.jia@zilliz.com> Signed-off-by: jingkl <jingjing.jia@zilliz.com>pull/20785/head
parent
89bdb34c98
commit
2966710b9f
|
@ -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 = 100
|
||||
disktimeout = 300
|
||||
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)
|
||||
|
|
|
@ -70,6 +70,7 @@ class TestCompactionParams(TestcaseBase):
|
|||
log.debug(c_plans2.plans[0].target)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="https://github.com/milvus-io/milvus/issues/20747")
|
||||
def test_compact_partition(self):
|
||||
"""
|
||||
target: test compact partition
|
||||
|
|
|
@ -1580,11 +1580,11 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
index, _ = self.index_wrap.init_index(collection_w.collection, default_float_vec_field_name, ct.default_diskann_index)
|
||||
log.info(self.index_wrap.params)
|
||||
cf.assert_equal_index(index, collection_w.indexes[0])
|
||||
collection_w.load()
|
||||
assert collection_w.num_entities == default_nb
|
||||
vectors = [[random.random() for _ in range(default_dim)] for _ in range(default_nq)]
|
||||
search_res, _ = collection_w.search(vectors[:default_nq], default_search_field,
|
||||
ct.default_diskann_search_params, default_limit,
|
||||
|
@ -1625,6 +1625,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
res, _ = collection_w.create_index(ct.default_float_vec_field_name, ct.default_diskann_index,
|
||||
index_name=ct.default_index_name, _async=_async,
|
||||
_callback=self.call_back())
|
||||
|
@ -1651,6 +1652,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
res, _ = collection_w.create_index(ct.default_float_vec_field_name, ct.default_diskann_index,
|
||||
index_name=ct.default_index_name, _async=_async)
|
||||
if _async:
|
||||
|
@ -1699,6 +1701,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
collection_w.create_index(default_float_vec_field_name, ct.default_diskann_index, index_name=index_name1)
|
||||
collection_w.load()
|
||||
assert len(collection_w.indexes) == 1
|
||||
|
@ -1718,6 +1721,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
collection_w.create_index(default_field_name, ct.default_diskann_index)
|
||||
collection_w.load()
|
||||
assert len(collection_w.indexes) == 1
|
||||
|
@ -1739,6 +1743,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
data = cf.gen_default_list_data()
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
collection_w.create_index(default_float_vec_field_name, ct.default_diskann_index, index_name="a")
|
||||
assert collection_w.has_index(index_name="a")[0] == True
|
||||
collection_w.create_index(default_string_field_name, default_string_index_params, index_name="b")
|
||||
|
@ -1762,6 +1767,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
assert collection_w.has_partition(partition_name)[0]
|
||||
df = cf.gen_default_list_data()
|
||||
ins_res, _ = partition_w.insert(df)
|
||||
assert collection_w.num_entities == default_nb
|
||||
collection_w.create_index(default_float_vec_field_name, ct.default_diskann_index)
|
||||
collection_w.load()
|
||||
assert len(collection_w.indexes) == 1
|
||||
|
@ -1797,6 +1803,7 @@ class TestIndexDiskann(TestcaseBase):
|
|||
collection_w = self.init_collection_wrap(name=c_name)
|
||||
data = cf.gen_default_list_data(default_nb)
|
||||
collection_w.insert(data=data)
|
||||
assert collection_w.num_entities == default_nb
|
||||
|
||||
def build(collection_w):
|
||||
|
||||
|
|
|
@ -300,8 +300,8 @@ class TestCollectionSearchInvalid(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_invalid_params_type(self, index, params):
|
||||
"""
|
||||
target: test search with invalid search params
|
||||
|
@ -1476,8 +1476,8 @@ class TestCollectionSearch(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_after_different_index_with_params(self, dim, index, params, auto_id, _async):
|
||||
"""
|
||||
target: test search after different index
|
||||
|
@ -1554,8 +1554,8 @@ class TestCollectionSearch(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_after_index_different_metric_type(self, dim, index, params, auto_id, _async):
|
||||
"""
|
||||
target: test search with different metric type
|
||||
|
@ -2960,8 +2960,8 @@ class TestSearchBase(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_index_empty_partition(self, index, params):
|
||||
"""
|
||||
target: test basic search function, all the search params are correct, test all index params, and build
|
||||
|
@ -3009,8 +3009,8 @@ class TestSearchBase(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_index_partitions(self, index, params, get_top_k):
|
||||
"""
|
||||
target: test basic search function, all the search params are correct, test all index params, and build
|
||||
|
@ -3069,8 +3069,8 @@ class TestSearchBase(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_ip_after_index(self, index, params):
|
||||
"""
|
||||
target: test basic search function, all the search params are correct, test all index params, and build
|
||||
|
@ -3126,8 +3126,8 @@ class TestSearchBase(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_ip_index_empty_partition(self, index, params):
|
||||
"""
|
||||
target: test basic search function, all the search params are correct, test all index params, and build
|
||||
|
@ -3169,8 +3169,8 @@ class TestSearchBase(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_ip_index_partitions(self, index, params):
|
||||
"""
|
||||
target: test basic search function, all the search params are correct, test all index params, and build
|
||||
|
@ -4101,8 +4101,8 @@ class TestsearchPagination(TestcaseBase):
|
|||
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("index, params",
|
||||
zip(ct.all_index_types[:6],
|
||||
ct.default_index_params[:6]))
|
||||
zip(ct.all_index_types[:7],
|
||||
ct.default_index_params[:7]))
|
||||
def test_search_pagination_after_different_index(self, index, params, auto_id, offset, _async):
|
||||
"""
|
||||
target: test search pagination after different index
|
||||
|
@ -4224,7 +4224,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
yield request.param
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
def test_search_with_diskann_index(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4264,7 +4263,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
@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):
|
||||
|
@ -4296,7 +4294,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
@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):
|
||||
|
@ -4328,7 +4325,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
)
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
@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):
|
||||
|
@ -4359,7 +4355,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
"err_msg": "fail to search on all shard leaders"}
|
||||
)
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
def test_search_with_diskann_with_string_pk(self, dim):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4392,7 +4387,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
def test_search_with_delete_data(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
@ -4435,7 +4429,6 @@ class TestsearchDiskann(TestcaseBase):
|
|||
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason="wait to test")
|
||||
def test_search_with_diskann_and_more_index(self, dim, auto_id, _async):
|
||||
"""
|
||||
target: test delete after creating index
|
||||
|
|
|
@ -714,6 +714,7 @@ class TestUtilityBase(TestcaseBase):
|
|||
assert res['total_rows'] == nb
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L1)
|
||||
@pytest.mark.skip(reason='wait to modify')
|
||||
def test_index_process_collection_indexing(self):
|
||||
"""
|
||||
target: test building_process
|
||||
|
|
Loading…
Reference in New Issue