Skip to content

Commit

Permalink
test: update test cases (milvus-io#36841)
Browse files Browse the repository at this point in the history
Signed-off-by: nico <[email protected]>
  • Loading branch information
NicoYuan1986 authored Oct 14, 2024
1 parent af2da8d commit 937ebec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/python_client/testcases/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ def test_invalid_sparse_metric_type(self, metric_type, index):
collection_w.insert(data=data)
param = cf.get_index_params_params(index)
params = {"index_type": index, "metric_type": metric_type, "params": param}
error = {ct.err_code: 65535, ct.err_msg: "only IP is the supported metric type for sparse index"}
error = {ct.err_code: 65535, ct.err_msg: "only IP&BM25 is the supported metric type for sparse index"}
index, _ = self.index_wrap.init_index(collection_w.collection, ct.default_sparse_vec_field_name, params,
check_task=CheckTasks.err_res,
check_items=error)
Expand Down
5 changes: 3 additions & 2 deletions tests/python_client/testcases/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ def test_query_expr_by_bool_field(self):
# not support filter bool field with expr 'bool in [0/ 1]'
not_support_expr = f'{ct.default_bool_field_name} in [0]'
error = {ct.err_code: 65535,
ct.err_msg: "cannot parse expression: bool in [0], error: value '0' in list cannot be casted to Bool"}
ct.err_msg: "cannot parse expression: bool in [0], error: "
"value 'int64_val:0' in list cannot be casted to Bool"}
self.collection_wrap.query(not_support_expr, output_fields=[ct.default_bool_field_name],
check_task=CheckTasks.err_res, check_items=error)

Expand Down Expand Up @@ -456,7 +457,7 @@ def test_query_expr_wrong_term_keyword(self):

expr_3 = f'{ct.default_int64_field_name} in not [1, 2]'
error_3 = {ct.err_code: 65535, ct.err_msg: "cannot parse expression: int64 in not [1, 2], "
"error: line 1:9 no viable alternative at input 'innot'"}
"error: value 'not[1,2]' in list cannot be a non-const expression"}
collection_w.query(expr_3, check_task=CheckTasks.err_res, check_items=error_3)

@pytest.mark.tags(CaseLabel.L1)
Expand Down

0 comments on commit 937ebec

Please sign in to comment.