diff --git a/tests/python_client/base/collection_wrapper.py b/tests/python_client/base/collection_wrapper.py index b38a189de3..2c915a1809 100644 --- a/tests/python_client/base/collection_wrapper.py +++ b/tests/python_client/base/collection_wrapper.py @@ -192,11 +192,29 @@ class ApiCollectionWrapper: check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run() return res, check_result - def create_alias(self): - pass + def create_alias(self, alias_name, check_task=None, check_items=None, **kwargs): + timeout = kwargs.get("timeout", TIMEOUT) + kwargs.update({"timeout": timeout}) - def drop_alias(self): - pass + func_name = sys._getframe().f_code.co_name + res, check = api_request([self.collection.create_alias, alias_name], **kwargs) + check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run() + return res, check_result - def alter_alias(self): - pass + def drop_alias(self, alias_name, check_task=None, check_items=None, **kwargs): + timeout = kwargs.get("timeout", TIMEOUT) + kwargs.update({"timeout": timeout}) + + func_name = sys._getframe().f_code.co_name + res, check = api_request([self.collection.drop_alias, alias_name], **kwargs) + check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run() + return res, check_result + + def alter_alias(self, alias_name, check_task=None, check_items=None, **kwargs): + timeout = kwargs.get("timeout", TIMEOUT) + kwargs.update({"timeout": timeout}) + + func_name = sys._getframe().f_code.co_name + res, check = api_request([self.collection.alter_alias, alias_name], **kwargs) + check_result = ResponseChecker(res, func_name, check_task, check_items, check, **kwargs).run() + return res, check_result diff --git a/tests/python_client/requirements.txt b/tests/python_client/requirements.txt index a4f1d5cd81..51be6dad99 100644 --- a/tests/python_client/requirements.txt +++ b/tests/python_client/requirements.txt @@ -12,7 +12,7 @@ pytest-print==0.2.1 pytest-level==0.1.1 pytest-xdist==2.2.1 # pytest-parallel -pymilvus==2.0.0rc7.dev4 +pymilvus==2.0.0rc7.dev11 pytest-rerunfailures==9.1.1 git+https://github.com/Projectplace/pytest-tags ndg-httpsclient