mirror of https://github.com/milvus-io/milvus.git
Update test case collection consistency level to strong (#15218)
Signed-off-by: ThreadDao <yufen.zong@zilliz.com>pull/15222/head
parent
2c4c9f3e7a
commit
7a9f5f00f5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue