mirror of https://github.com/milvus-io/milvus.git
Update pymilvus version and consistency import (#15226)
Signed-off-by: ThreadDao <yufen.zong@zilliz.com>pull/15246/head
parent
871e093dc8
commit
1c3abbb052
|
@ -7,7 +7,7 @@ sys.path.append("..")
|
|||
from check.func_check import ResponseChecker
|
||||
from utils.api_request import api_request
|
||||
from utils.util_log import test_log as log
|
||||
from pymilvus.grpc_gen.common_pb2 import ConsistencyLevel
|
||||
from pymilvus.orm.types import CONSISTENCY_STRONG
|
||||
|
||||
TIMEOUT = 20
|
||||
|
||||
|
@ -20,7 +20,7 @@ class ApiCollectionWrapper:
|
|||
collection = None
|
||||
|
||||
def init_collection(self, name, schema=None, using="default", shards_num=2, check_task=None, check_items=None, **kwargs):
|
||||
consistency_level = kwargs.get("consistency_level", ConsistencyLevel.Strong)
|
||||
consistency_level = kwargs.get("consistency_level", CONSISTENCY_STRONG)
|
||||
kwargs.update({"consistency_level": consistency_level})
|
||||
|
||||
""" In order to distinguish the same name of collection """
|
||||
|
|
|
@ -11,6 +11,7 @@ from base.client_base import param_info
|
|||
from check.param_check import ip_check, number_check
|
||||
from config.log_config import log_config
|
||||
from utils.util_pymilvus import get_milvus, gen_unique_str, gen_default_fields, gen_binary_default_fields
|
||||
from pymilvus.orm.types import CONSISTENCY_STRONG
|
||||
|
||||
timeout = 60
|
||||
dimension = 128
|
||||
|
@ -363,7 +364,7 @@ def collection(request, connect):
|
|||
log.debug(f'collection_name: {collection_name}')
|
||||
try:
|
||||
default_fields = gen_default_fields()
|
||||
connect.create_collection(collection_name, default_fields)
|
||||
connect.create_collection(collection_name, default_fields, consistency_level=CONSISTENCY_STRONG)
|
||||
except Exception as e:
|
||||
pytest.exit(str(e))
|
||||
|
||||
|
@ -384,7 +385,7 @@ def id_collection(request, connect):
|
|||
log.debug(f'id_collection_name: {collection_name}')
|
||||
try:
|
||||
fields = gen_default_fields(auto_id=False)
|
||||
connect.create_collection(collection_name, fields)
|
||||
connect.create_collection(collection_name, fields, consistency_level=CONSISTENCY_STRONG)
|
||||
except Exception as e:
|
||||
pytest.exit(str(e))
|
||||
|
||||
|
@ -403,7 +404,7 @@ def binary_collection(request, connect):
|
|||
collection_name = gen_unique_str(ori_collection_name)
|
||||
try:
|
||||
fields = gen_binary_default_fields()
|
||||
connect.create_collection(collection_name, fields)
|
||||
connect.create_collection(collection_name, fields, consistency_level=CONSISTENCY_STRONG)
|
||||
except Exception as e:
|
||||
pytest.exit(str(e))
|
||||
|
||||
|
@ -424,7 +425,7 @@ def binary_id_collection(request, connect):
|
|||
collection_name = gen_unique_str(ori_collection_name)
|
||||
try:
|
||||
fields = gen_binary_default_fields(auto_id=False)
|
||||
connect.create_collection(collection_name, fields)
|
||||
connect.create_collection(collection_name, fields, consistency_level=CONSISTENCY_STRONG)
|
||||
except Exception as e:
|
||||
pytest.exit(str(e))
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ allure-pytest==2.7.0
|
|||
pytest-print==0.2.1
|
||||
pytest-level==0.1.1
|
||||
pytest-xdist==2.2.1
|
||||
pymilvus==2.0.0rc10.dev5
|
||||
pymilvus==2.0.0rc10.dev7
|
||||
pytest-rerunfailures==9.1.1
|
||||
git+https://github.com/Projectplace/pytest-tags
|
||||
ndg-httpsclient
|
||||
|
|
Loading…
Reference in New Issue