mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
test: update test cases (#32568)
Signed-off-by: nico <cheng.yuan@zilliz.com>
This commit is contained in:
parent
11bde38063
commit
96efa18cf4
@ -741,8 +741,8 @@ def gen_general_list_all_data_type(nb=ct.default_nb, dim=ct.default_dim, start=0
|
||||
insert_list.append(gen_vectors(nb, multiple_dim_array[i], ct.vector_data_type_all[i%3]))
|
||||
|
||||
if with_json is False:
|
||||
index = insert_list.index(json_values)
|
||||
del insert_list[index]
|
||||
# index = insert_list.index(json_values)
|
||||
del insert_list[8]
|
||||
if auto_id:
|
||||
if primary_field == ct.default_int64_field_name:
|
||||
index = insert_list.index(int64_values)
|
||||
|
||||
@ -3188,10 +3188,8 @@ class TestLoadCollection(TestcaseBase):
|
||||
insert_res, _ = collection_w.insert(df)
|
||||
assert collection_w.num_entities == ct.default_nb
|
||||
|
||||
collection_w.get_replicas(check_task=CheckTasks.err_res,
|
||||
check_items={"err_code": 400,
|
||||
"err_msg": "failed to get replicas by collection: "
|
||||
"replica not found"})
|
||||
res, _ = collection_w.get_replicas()
|
||||
assert len(res.groups) == 0
|
||||
|
||||
@pytest.mark.tags(CaseLabel.L3)
|
||||
def test_count_multi_replicas(self):
|
||||
|
||||
@ -3594,8 +3594,13 @@ class TestQueryCount(TestcaseBase):
|
||||
bool_type_cmp = True
|
||||
if bool_type == "false":
|
||||
bool_type_cmp = False
|
||||
for i in range(len(_vectors[0])):
|
||||
if _vectors[0][i].dtypes == bool:
|
||||
num = i
|
||||
break
|
||||
|
||||
for i, _id in enumerate(insert_ids):
|
||||
if _vectors[0][f"{ct.default_bool_field_name}"][i] == bool_type_cmp:
|
||||
if _vectors[0][num][i] == bool_type_cmp:
|
||||
filter_ids.append(_id)
|
||||
res = len(filter_ids)
|
||||
|
||||
|
||||
@ -3191,12 +3191,17 @@ class TestCollectionSearch(TestcaseBase):
|
||||
bool_type_cmp = True
|
||||
if bool_type == "false":
|
||||
bool_type_cmp = False
|
||||
for i, _id in enumerate(insert_ids):
|
||||
if enable_dynamic_field:
|
||||
if _vectors[0][i][f"{default_bool_field_name}"] == bool_type_cmp:
|
||||
if enable_dynamic_field:
|
||||
for i, _id in enumerate(insert_ids):
|
||||
if _vectors[0][i][f"{ct.default_bool_field_name}"] == bool_type_cmp:
|
||||
filter_ids.append(_id)
|
||||
else:
|
||||
if _vectors[0][f"{default_bool_field_name}"][i] == bool_type_cmp:
|
||||
else:
|
||||
for i in range(len(_vectors[0])):
|
||||
if _vectors[0][i].dtypes == bool:
|
||||
num = i
|
||||
break
|
||||
for i, _id in enumerate(insert_ids):
|
||||
if _vectors[0][num][i] == bool_type_cmp:
|
||||
filter_ids.append(_id)
|
||||
|
||||
# 4. search with different expressions
|
||||
@ -7472,6 +7477,8 @@ class TestCollectionRangeSearch(TestcaseBase):
|
||||
method: test range search with different metric type
|
||||
expected: searched successfully
|
||||
"""
|
||||
if index == "SCANN":
|
||||
pytest.skip("https://github.com/milvus-io/milvus/issues/32648")
|
||||
# 1. initialize with data
|
||||
collection_w, _, _, insert_ids, time_stamp = self.init_collection_general(prefix, True, 5000,
|
||||
partition_num=1,
|
||||
@ -11442,6 +11449,7 @@ class TestCollectionHybridSearchValid(TestcaseBase):
|
||||
@pytest.mark.tags(CaseLabel.L2)
|
||||
@pytest.mark.parametrize("k", [1, 60, 1000, 16383])
|
||||
@pytest.mark.parametrize("offset", [0, 1, 5])
|
||||
@pytest.mark.skip("https://github.com/milvus-io/milvus/issues/32650")
|
||||
def test_hybrid_search_RRFRanker_different_k(self, dim, auto_id, is_flush, enable_dynamic_field, k, offset):
|
||||
"""
|
||||
target: test hybrid search normal case
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user