Update test case collection consistency level to strong (#15218)

Signed-off-by: ThreadDao <yufen.zong@zilliz.com>
pull/15222/head
ThreadDao 2022-01-14 18:21:34 +08:00 committed by GitHub
parent 2c4c9f3e7a
commit 7a9f5f00f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -7,6 +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
TIMEOUT = 20
@ -18,8 +19,10 @@ TIMEOUT = 20
class ApiCollectionWrapper:
collection = None
def init_collection(self, name, schema=None, using="default", shards_num=2, check_task=None, check_items=None,
**kwargs):
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)
kwargs.update({"consistency_level": consistency_level})
""" 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)
@ -121,7 +124,7 @@ class ApiCollectionWrapper:
def query(self, expr, output_fields=None, partition_names=None, timeout=None, check_task=None, check_items=None,
**kwargs):
time.sleep(5)
# time.sleep(5)
timeout = TIMEOUT if timeout is None else timeout
func_name = sys._getframe().f_code.co_name