From 8dafe104b176787fd86d9801a2f886422402f79a Mon Sep 17 00:00:00 2001 From: ThreadDao Date: Wed, 17 Nov 2021 20:59:12 +0800 Subject: [PATCH] Fix query result check (#12030) Signed-off-by: ThreadDao --- tests/python_client/check/func_check.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/python_client/check/func_check.py b/tests/python_client/check/func_check.py index b6d361993..b3a7fe3db 100644 --- a/tests/python_client/check/func_check.py +++ b/tests/python_client/check/func_check.py @@ -244,8 +244,14 @@ class ResponseChecker: 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): -- GitLab