milvus
milvus copied to clipboard
[Bug]: [Nightly]Lack error detection of invalid guarantee timestamp when search
Is there an existing issue for this?
- [X] I have searched the existing issues
Environment
- Milvus version: d163b77
- Deployment mode(standalone or cluster): cluster
- MQ type(rocksmq, pulsar or kafka): kafka
- SDK version(e.g. pymilvus v2.0.0rc2): 2.2.9.dev28
Current Behavior
Lack error detection of invalid guarantee timestamp when search.
[2023-05-31T21:20:22.196Z] get_invalid_guarantee_timestamp = None
[2023-05-31T21:20:22.196Z]
[2023-05-31T21:20:22.196Z] @pytest.mark.tags(CaseLabel.L2)
[2023-05-31T21:20:22.196Z] def test_search_param_invalid_guarantee_timestamp(self, get_invalid_guarantee_timestamp):
[2023-05-31T21:20:22.196Z] """
[2023-05-31T21:20:22.196Z] target: test search with invalid guarantee timestamp
[2023-05-31T21:20:22.196Z] method: search with invalid guarantee timestamp
[2023-05-31T21:20:22.196Z] expected: raise exception and report the error
[2023-05-31T21:20:22.196Z] """
[2023-05-31T21:20:22.196Z] # 1. initialize with data
[2023-05-31T21:20:22.196Z] collection_w = self.init_collection_general(prefix, True, 10)[0]
[2023-05-31T21:20:22.196Z] # 2. search with invalid travel timestamp
[2023-05-31T21:20:22.196Z] log.info("test_search_param_invalid_guarantee_timestamp: searching with invalid guarantee timestamp")
[2023-05-31T21:20:22.196Z] invalid_guarantee_time = get_invalid_guarantee_timestamp
[2023-05-31T21:20:22.196Z] > collection_w.search(vectors[:default_nq], default_search_field, default_search_params,
[2023-05-31T21:20:22.196Z] default_limit, default_search_exp,
[2023-05-31T21:20:22.196Z] guarantee_timestamp=invalid_guarantee_time,
[2023-05-31T21:20:22.196Z] check_task=CheckTasks.err_res,
[2023-05-31T21:20:22.196Z] check_items={"err_code": 1,
[2023-05-31T21:20:22.196Z] "err_msg": "`guarantee_timestamp` value %s is illegal"
[2023-05-31T21:20:22.196Z] % invalid_guarantee_time})
[2023-05-31T21:20:22.196Z]
[2023-05-31T21:20:22.196Z] testcases/test_search.py:896:
[2023-05-31T21:20:22.196Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2023-05-31T21:20:22.196Z] utils/wrapper.py:33: in inner_wrapper
[2023-05-31T21:20:22.196Z] res, result = func(*args, **kwargs)
[2023-05-31T21:20:22.196Z] base/collection_wrapper.py:172: in search
[2023-05-31T21:20:22.196Z] check_result = ResponseChecker(res, func_name, check_task, check_items, check,
[2023-05-31T21:20:22.196Z] check/func_check.py:38: in run
[2023-05-31T21:20:22.196Z] result = self.assert_exception(self.response, self.succ, self.check_items)
[2023-05-31T21:20:22.196Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2023-05-31T21:20:22.196Z]
[2023-05-31T21:20:22.196Z] res = <pymilvus.orm.search.SearchResult object at 0x7f7d5c3bce20>, actual = True
[2023-05-31T21:20:22.196Z] error_dict = {'err_code': 1, 'err_msg': '`guarantee_timestamp` value None is illegal'}
[2023-05-31T21:20:22.196Z]
[2023-05-31T21:20:22.196Z] @staticmethod
[2023-05-31T21:20:22.196Z] def assert_exception(res, actual=True, error_dict=None):
[2023-05-31T21:20:22.196Z] > assert actual is False
[2023-05-31T21:20:22.196Z] E AssertionError
Expected Behavior
raise exception
Steps To Reproduce
No response
Milvus Log
- link: https://jenkins.milvus.io:18080/blue/organizations/jenkins/Milvus%20Nightly%20CI/detail/2.2.0/207/pipeline/140/
- log: artifacts-milvus-distributed-kafka-nightly-207-pymilvus-e2e-logs.tar.gz
- collection name: search_collection_yfetMgLX
- failed time: [2023-05-31T20:12:05.622Z] [gw2] [ 25%] FAILED testcases/test_search.py::TestCollectionSearchInvalid::test_search_param_invalid_guarantee_timestamp[None]
Anything else?
No response
/assign @XuanYang-cn
/assign @czs007
None
is legal for now. @NicoYuan1986 @XuanYang-cn sorry to forget to sync this to you.
@NicoYuan1986 please help change this test case.
/assign @NicoYuan1986
/unassign
Fixed.