Update pymilvus version (#23738)

Signed-off-by: nico <cheng.yuan@zilliz.com>
This commit is contained in:
nico 2023-04-27 09:22:35 +08:00 committed by GitHub
parent 8d3007b479
commit 353305c091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 9 deletions

View File

@ -27,7 +27,7 @@ class ApiCollectionWrapper:
def __init__(self, active_trace=False): def __init__(self, active_trace=False):
self.active_trace = active_trace self.active_trace = active_trace
def init_collection(self, name, schema=None, using="default", shards_num=2, check_task=None, check_items=None, def init_collection(self, name, schema=None, using="default", check_task=None, check_items=None,
active_trace=False, **kwargs): active_trace=False, **kwargs):
self.active_trace = active_trace self.active_trace = active_trace
consistency_level = kwargs.get("consistency_level", CONSISTENCY_STRONG) consistency_level = kwargs.get("consistency_level", CONSISTENCY_STRONG)
@ -35,10 +35,10 @@ class ApiCollectionWrapper:
""" In order to distinguish the same name of collection """ """ In order to distinguish the same name of collection """
func_name = sys._getframe().f_code.co_name func_name = sys._getframe().f_code.co_name
res, is_succ = api_request([Collection, name, schema, using, shards_num], **kwargs) res, is_succ = api_request([Collection, name, schema, using], **kwargs)
self.collection = res if is_succ else None self.collection = res if is_succ else None
check_result = ResponseChecker(res, func_name, check_task, check_items, is_succ, check_result = ResponseChecker(res, func_name, check_task, check_items, is_succ,
name=name, schema=schema, using=using, shards_num=shards_num, **kwargs).run() name=name, schema=schema, using=using, **kwargs).run()
return res, check_result return res, check_result
@property @property
@ -72,8 +72,8 @@ class ApiCollectionWrapper:
return self.collection.primary_field return self.collection.primary_field
@property @property
def _shards_num(self): def shards_num(self):
return self.collection._shards_num return self.collection.shards_num
@property @property
def aliases(self): def aliases(self):

View File

@ -176,8 +176,6 @@ class ResponseChecker:
assert collection.num_entities == check_items.get("num_entities") assert collection.num_entities == check_items.get("num_entities")
if check_items.get("primary", None): if check_items.get("primary", None):
assert collection.primary_field.name == check_items.get("primary") assert collection.primary_field.name == check_items.get("primary")
if check_items.get("shards_num", None):
assert collection._shards_num == check_items.get("shards_num")
return True return True
@staticmethod @staticmethod

View File

@ -12,7 +12,7 @@ allure-pytest==2.7.0
pytest-print==0.2.1 pytest-print==0.2.1
pytest-level==0.1.1 pytest-level==0.1.1
pytest-xdist==2.5.0 pytest-xdist==2.5.0
pymilvus==2.4.0.dev12 pymilvus==2.4.0.dev19
pytest-rerunfailures==9.1.1 pytest-rerunfailures==9.1.1
git+https://github.com/Projectplace/pytest-tags git+https://github.com/Projectplace/pytest-tags
ndg-httpsclient ndg-httpsclient

View File

@ -18,7 +18,7 @@ exp_shards_num = "shards_num"
default_term_expr = f'{ct.default_int64_field_name} in [0, 1]' default_term_expr = f'{ct.default_int64_field_name} in [0, 1]'
default_schema = cf.gen_default_collection_schema() default_schema = cf.gen_default_collection_schema()
default_binary_schema = cf.gen_default_binary_collection_schema() default_binary_schema = cf.gen_default_binary_collection_schema()
default_shards_num = 2 default_shards_num = 1
uid_count = "collection_count" uid_count = "collection_count"
tag = "collection_count_tag" tag = "collection_count_tag"
uid_stats = "get_collection_stats" uid_stats = "get_collection_stats"