mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
Update pymilvus version (#23738)
Signed-off-by: nico <cheng.yuan@zilliz.com>
This commit is contained in:
parent
8d3007b479
commit
353305c091
@ -27,7 +27,7 @@ class ApiCollectionWrapper:
|
||||
def __init__(self, active_trace=False):
|
||||
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):
|
||||
self.active_trace = active_trace
|
||||
consistency_level = kwargs.get("consistency_level", CONSISTENCY_STRONG)
|
||||
@ -35,10 +35,10 @@ class ApiCollectionWrapper:
|
||||
|
||||
""" In order to distinguish the same name of collection """
|
||||
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
|
||||
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
|
||||
|
||||
@property
|
||||
@ -72,8 +72,8 @@ class ApiCollectionWrapper:
|
||||
return self.collection.primary_field
|
||||
|
||||
@property
|
||||
def _shards_num(self):
|
||||
return self.collection._shards_num
|
||||
def shards_num(self):
|
||||
return self.collection.shards_num
|
||||
|
||||
@property
|
||||
def aliases(self):
|
||||
|
@ -176,8 +176,6 @@ class ResponseChecker:
|
||||
assert collection.num_entities == check_items.get("num_entities")
|
||||
if check_items.get("primary", None):
|
||||
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
|
||||
|
||||
@staticmethod
|
||||
|
@ -12,7 +12,7 @@ allure-pytest==2.7.0
|
||||
pytest-print==0.2.1
|
||||
pytest-level==0.1.1
|
||||
pytest-xdist==2.5.0
|
||||
pymilvus==2.4.0.dev12
|
||||
pymilvus==2.4.0.dev19
|
||||
pytest-rerunfailures==9.1.1
|
||||
git+https://github.com/Projectplace/pytest-tags
|
||||
ndg-httpsclient
|
||||
|
@ -18,7 +18,7 @@ exp_shards_num = "shards_num"
|
||||
default_term_expr = f'{ct.default_int64_field_name} in [0, 1]'
|
||||
default_schema = cf.gen_default_collection_schema()
|
||||
default_binary_schema = cf.gen_default_binary_collection_schema()
|
||||
default_shards_num = 2
|
||||
default_shards_num = 1
|
||||
uid_count = "collection_count"
|
||||
tag = "collection_count_tag"
|
||||
uid_stats = "get_collection_stats"
|
||||
|
Loading…
Reference in New Issue
Block a user