示例#1
0
 def create_partition(collection, threads_n):
     for _ in range(ct.max_partition_num // threads_n):
         name = cf.gen_unique_str(prefix)
         par_wrap = ApiPartitionWrapper()
         par_wrap.init_partition(collection,
                                 name,
                                 check_task=CheckTasks.check_nothing)
示例#2
0
 def init_partition_wrap(self, collection_wrap=None, name=None, description=None,
                         check_task=None, check_items=None, **kwargs):
     name = cf.gen_unique_str("partition_") if name is None else name
     description = cf.gen_unique_str("partition_des_") if description is None else description
     collection_wrap = self.init_collection_wrap() if collection_wrap is None else collection_wrap
     partition_wrap = ApiPartitionWrapper()
     partition_wrap.init_partition(collection_wrap.collection, name, description,
                                   check_task=check_task, check_items=check_items,
                                   **kwargs)
     return partition_wrap
示例#3
0
 def setup(self):
     log.info(("*" * 35) + " setup " + ("*" * 35))
     self.connection_wrap = ApiConnectionsWrapper()
     self.collection_wrap = ApiCollectionWrapper()
     self.partition_wrap = ApiPartitionWrapper()
     self.index_wrap = ApiIndexWrapper()
     self.utility_wrap = ApiUtilityWrapper()
     self.collection_schema_wrap = ApiCollectionSchemaWrapper()
     self.field_schema_wrap = ApiFieldSchemaWrapper()
示例#4
0
 def setup_method(self, method):
     log.info(("*" * 35) + " setup " + ("*" * 35))
     log.info("[setup_method] Start setup test case %s." % method.__name__)
     self.connection_wrap = ApiConnectionsWrapper()
     self.utility_wrap = ApiUtilityWrapper()
     self.collection_wrap = ApiCollectionWrapper()
     self.partition_wrap = ApiPartitionWrapper()
     self.index_wrap = ApiIndexWrapper()
     self.collection_schema_wrap = ApiCollectionSchemaWrapper()
     self.field_schema_wrap = ApiFieldSchemaWrapper()