Skip to content

Commit

Permalink
Fix query result check (milvus-io#12030)
Browse files Browse the repository at this point in the history
Signed-off-by: ThreadDao <[email protected]>
  • Loading branch information
ThreadDao authored Nov 17, 2021
1 parent b7de3bd commit 8dafe10
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/python_client/check/func_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,14 @@ def check_query_results(query_res, func_name, check_items):
raise Exception("No expect values found in the check task")
exp_res = check_items.get("exp_res", None)
with_vec = check_items.get("with_vec", False)
if exp_res and isinstance(query_res, list):
assert pc.equal_entities_list(exp=exp_res, actual=query_res, with_vec=with_vec)
if exp_res is not None:
if isinstance(query_res, list):
assert pc.equal_entities_list(exp=exp_res, actual=query_res, with_vec=with_vec)
return True
else:
log.error(f"Query result {query_res} is not list")
return False
log.warning(f'Expected query result is {exp_res}')

@staticmethod
def check_query_empty(query_res, func_name):
Expand Down

0 comments on commit 8dafe10

Please sign in to comment.