test: update test cases (#36841)

Signed-off-by: nico <cheng.yuan@zilliz.com>
This commit is contained in:
nico 2024-10-14 19:13:23 +08:00 committed by GitHub
parent af2da8d8d6
commit 937ebec2ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -1463,7 +1463,7 @@ class TestIndexInvalid(TestcaseBase):
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)

View File

@ -339,7 +339,8 @@ class TestQueryParams(TestcaseBase):
# 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)
@ -456,7 +457,7 @@ class TestQueryParams(TestcaseBase):
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)