milvus/tests/python/test_load_partitions.py
neza2017 e396c3f4ad Add zap log
Signed-off-by: neza2017 <yefu.chen@zilliz.com>
2021-02-24 16:25:40 +08:00

27 lines
1.0 KiB
Python

from tests.utils import *
from tests.constants import *
uniq_id = "load_partitions"
class TestLoadPartitions:
"""
******************************************************************
The following cases are used to test `load_partitions` function
******************************************************************
"""
def test_load_partitions(self, connect, collection):
'''
target: test load collection and wait for loading collection
method: insert then flush, when flushed, try load collection
expected: no errors
'''
partition_tag = "lvn9pq34u8rasjk"
connect.create_partition(collection, partition_tag + "1")
ids = connect.insert(collection, default_entities, partition_tag=partition_tag + "1")
connect.create_partition(collection, partition_tag + "2")
ids = connect.insert(collection, default_entity, partition_tag=partition_tag + "2")
connect.flush([collection])
connect.load_partitions(collection, [partition_tag + "2"])