Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update test cases #35867

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions tests/python_client/milvus_client/test_milvus_client_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ def test_milvus_client_insert_data_vector_field_missing(self):
rng = np.random.default_rng(seed=19530)
rows = [{default_primary_key_field_name: i,
default_float_field_name: i * 1.0, default_string_field_name: str(i)} for i in range(default_nb)]
error = {ct.err_code: 1, ct.err_msg: f"Field vector don't match in entities[0]"}
client_w.insert(client, collection_name, data= rows,
error = {ct.err_code: 1, ct.err_msg: f"float vector field 'vector' is illegal, array type mismatch: "
f"invalid parameter[expected=need float vector][actual=got nil]"}
client_w.insert(client, collection_name, data=rows,
check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L1)
Expand All @@ -219,8 +220,8 @@ def test_milvus_client_insert_data_id_field_missing(self):
rng = np.random.default_rng(seed=19530)
rows = [{default_vector_field_name: list(rng.random((1, default_dim))[0]),
default_float_field_name: i * 1.0, default_string_field_name: str(i)} for i in range(default_nb)]
error = {ct.err_code: 1, ct.err_msg: f"Field id don't match in entities[0]"}
client_w.insert(client, collection_name, data= rows,
error = {ct.err_code: 1, ct.err_msg: f"currently not support vector field as PrimaryField: invalid parameter"}
client_w.insert(client, collection_name, data=rows,
check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L1)
Expand Down Expand Up @@ -671,8 +672,9 @@ def test_milvus_client_upsert_data_vector_field_missing(self):
rng = np.random.default_rng(seed=19530)
rows = [{default_primary_key_field_name: i,
default_float_field_name: i * 1.0, default_string_field_name: str(i)} for i in range(default_nb)]
error = {ct.err_code: 1, ct.err_msg: f"Field vector don't match in entities[0]"}
client_w.upsert(client, collection_name, data= rows,
error = {ct.err_code: 1, ct.err_msg: f"float vector field 'vector' is illegal, array type mismatch: "
f"invalid parameter[expected=need float vector][actual=got nil]"}
client_w.upsert(client, collection_name, data=rows,
check_task=CheckTasks.err_res, check_items=error)

@pytest.mark.tags(CaseLabel.L1)
Expand All @@ -690,7 +692,7 @@ def test_milvus_client_upsert_data_id_field_missing(self):
rng = np.random.default_rng(seed=19530)
rows = [{default_vector_field_name: list(rng.random((1, default_dim))[0]),
default_float_field_name: i * 1.0, default_string_field_name: str(i)} for i in range(default_nb)]
error = {ct.err_code: 1, ct.err_msg: f"Field id don't match in entities[0]"}
error = {ct.err_code: 1, ct.err_msg: f"currently not support vector field as PrimaryField: invalid parameter"}
client_w.upsert(client, collection_name, data= rows,
check_task=CheckTasks.err_res, check_items=error)

Expand Down
4 changes: 2 additions & 2 deletions tests/python_client/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ allure-pytest==2.7.0
pytest-print==0.2.1
pytest-level==0.1.1
pytest-xdist==2.5.0
pymilvus==2.5.0rc70
pymilvus[bulk_writer]==2.5.0rc70
pymilvus==2.5.0rc74
pymilvus[bulk_writer]==2.5.0rc74
pytest-rerunfailures==9.1.1
git+https://github.com/Projectplace/pytest-tags
ndg-httpsclient
Expand Down
4 changes: 2 additions & 2 deletions tests/python_client/testcases/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2832,8 +2832,8 @@ def test_load_replica_change(self):
assert loading_progress == {'loading_progress': '100%'}

# verify load different replicas thrown an exception
error = {ct.err_code: 1100, ct.err_msg: "failed to load collection: can't change the replica number for "
"loaded collection: expected=1, actual=2: invalid parameter"}
error = {ct.err_code: 1100, ct.err_msg: "call query coordinator LoadCollection: can't change the replica number"
" for loaded collection: invalid parameter[expected=1][actual=2]"}
collection_w.load(replica_number=2, check_task=CheckTasks.err_res, check_items=error)
one_replica, _ = collection_w.get_replicas()
assert len(one_replica.groups) == 1
Expand Down
2 changes: 1 addition & 1 deletion tests/python_client/testcases/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -10445,7 +10445,7 @@ def test_search_group_by_unsupported_index(self, index):
3. search with group by
verify: the error code and msg
"""
if index in ["HNSW", "IVF_FLAT", "FLAT"]:
if index in ["HNSW", "IVF_FLAT", "FLAT", "IVF_SQ8"]:
pass # Only HNSW and IVF_FLAT are supported
else:
metric = "L2"
Expand Down
Loading