未验证 提交 4d9a013d 编写于 作者: T ThreadDao 提交者: GitHub

Add cases for utility loading progress (#7682)

Signed-off-by: NThreadDao <yufen.zong@zilliz.com>
上级 5a303e76
......@@ -15,7 +15,7 @@ class ApiUtilityWrapper:
ut = utility
def loading_progress(self, collection_name, partition_names=[],
def loading_progress(self, collection_name, partition_names=None,
using="default", check_task=None, check_items=None):
func_name = sys._getframe().f_code.co_name
res, is_succ = api_request([self.ut.loading_progress, collection_name, partition_names, using])
......@@ -24,7 +24,7 @@ class ApiUtilityWrapper:
partition_names=partition_names, using=using).run()
return res, check_result
def wait_for_loading_complete(self, collection_name, partition_names=[], timeout=None, using="default",
def wait_for_loading_complete(self, collection_name, partition_names=None, timeout=None, using="default",
check_task=None, check_items=None):
timeout = TIMEOUT if timeout is None else timeout
......@@ -73,6 +73,16 @@ class ApiUtilityWrapper:
partition_name=partition_name, using=using).run()
return res, check_result
def drop_collection(self, collection_name, timeout=None, using="default", check_task=None, check_items=None):
func_name = sys._getframe().f_code.co_name
res, is_succ = api_request([self.ut.drop_collection(collection_name, timeout=timeout, using=using)])
check_result = ResponseChecker(res, func_name, check_task, check_items, is_succ,
collection_name=collection_name,
timeout=timeout, using=using).run()
log.debug(res)
log.debug(check_result)
return res, check_result
def list_collections(self, timeout=None, using="default", check_task=None, check_items=None):
timeout = TIMEOUT if timeout is None else timeout
......
......@@ -297,7 +297,6 @@ class TestQueryBase(TestcaseBase):
self.collection_wrap.query(term_expr, check_task=CheckTasks.check_query_results, check_items={exp_res: res})
@pytest.mark.tag(CaseLabel.L1)
@pytest.mark.xfail(reason="issue #7544")
def test_query_expr_random_values(self):
"""
target: test query with random filter values
......@@ -313,12 +312,12 @@ class TestQueryBase(TestcaseBase):
self.collection_wrap.load()
# random_values = [random.randint(0, ct.default_nb) for _ in range(4)]
random_values = [0, 2, 4, 0]
term_expr = f'{ct.default_int64_field_name} not in {random_values}'
random_values = [0, 2, 4, 3]
term_expr = f'{ct.default_int64_field_name} in {random_values}'
res = df.iloc[random_values, :1].to_dict('records')
self.collection_wrap.query(term_expr, check_task=CheckTasks.check_query_results, check_items={exp_res: res})
@pytest.mark.xfail(reason="issue #7553")
@pytest.mark.tag(CaseLabel.L1)
def test_query_expr_not_in_random(self):
self._connect()
df = cf.gen_default_dataframe_data(nb=50)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册