docstr: target: test create collection
  method: create a collection with a simple schema
  expected: create collection success
docstr_tok: ["target",":","test","create","collection","method",":","create","a","collection","with","a","simple","schema","expected",":","create","collection","success"]
code: def test_create_collections_default(
      self, dim, metric_type, primary_field, vector_field, db_name
  ):
      """
      target: test create collection
      method: create a collection with a simple schema
      expected: create collection success
      """
      self.create_database(db_name)
      name = gen_collection_name()
      dim = 128
      client = self.collection_client
      client.db_name = db_name
      payload = {
          "collectionName": name,
          "dimension": dim,
          "metricType": metric_type,
          "primaryField": primary_field,
          "vectorField": vector_field,
      }
      if primary_field is None:
          del payload["primaryField"]
      if vector_field is None:
          del payload["vectorField"]
      rsp = client.collection_create(payload)
      assert rsp["code"] == 200
      rsp = client.collection_list()
  
      all_collections = rsp["data"]
      assert name in all_collections
      # describe collection
      rsp = client.collection_describe(name)
      assert rsp["code"] == 200
      assert rsp["data"]["collectionName"] == name
  
imports: import datetime
  import random
  import time
  from utils.util_log import test_log
  from utils.utils import gen_collection_name
  import pytest
  from api.milvus import CollectionClient
  from base.testbase import TestBase
  import threading
label_desc: Use image node_id 1 for calling the TestCreateCollection obj's underlying member method code with example usage: obj.test_create_collections_default(dim, metric_type, primary_field, vector_field, db_name) without return types