docstr: Method:
  1. create a collectionA and insert data
  2. release the collection if loaded
  3. create a rgA
  4. transfer query node from default to rgA
  5. load the collection with default rg
  verify load fail with no available query node in default rg
  6. load the collection with rgA
  verify load succ and search succ
  verify rgA state
  7. transfer query node from rgA to default rg
  verify search keeps succ
  verify rgA and default rg state
  8. load the collection without rg specified
  verify load succ
docstr_tok: ["Method",":","1.","create","a","collectionA","and","insert","data","2.","release","the","collection","if","loaded","3.","create","a","rgA","4.","transfer","query","node","from","default","to","rgA","5.","load","the","collection","with","default","rg","verify","load","fail","with","no","available","query","node","in","default","rg","6.","load","the","collection","with","rgA","verify","load","succ","and","search","succ","verify","rgA","state","7.","transfer","query","node","from","rgA","to","default","rg","verify","search","keeps","succ","verify","rgA","and","default","rg","state","8.","load","the","collection","without","rg","specified","verify","load","succ"]
code: def test_load_collection_with_no_available_node(self):
      """
      Method:
      1. create a collectionA and insert data
      2. release the collection if loaded
      3. create a rgA
      4. transfer query node from default to rgA
      5. load the collection with default rg
      verify load fail with no available query node in default rg
      6. load the collection with rgA
      verify load succ and search succ
      verify rgA state
      7. transfer query node from rgA to default rg
      verify search keeps succ
      verify rgA and default rg state
      8. load the collection without rg specified
      verify load succ
      """
      self._connect()
      dim = ct.default_dim
      # 1. create a collectionA and insert data
      collection_w, _, _, insert_ids, _ = self.init_collection_general(
          insert_data=True, dim=dim
      )
      # 2. release the collection if loaded
      collection_w.release()
      # 3. create a rgA
      rg_name = cf.gen_unique_str("rg")
      self.init_resource_group(rg_name)
      # 4. transfer query node from default to rgA
      self.utility_wrap.transfer_node(
          source=ct.default_resource_group_name,
          target=rg_name,
          num_node=config_nodes,
      )
      # 5. load the collection with default rg
      error = {
          ct.err_code: 999,
          ct.err_msg: "failed to load collection, err=failed to spawn replica for collection[nodes not enough]",
      }
      collection_w.load(
          check_task=CheckTasks.err_res, check_items=error
      )
  
      # 6. load the collection with rgA
      rg_info = {
          "name": rg_name,
          "capacity": config_nodes,
          "num_available_node": config_nodes,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          rg_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rg_info,
      )
      collection_w.load(_resource_groups=[rg_name])
      nq = 5
      vectors = [
          [random.random() for _ in range(dim)] for _ in range(nq)
      ]
      # verify search succ
      collection_w.search(
          vectors[:nq],
          ct.default_float_vec_field_name,
          ct.default_search_params,
          ct.default_limit,
          check_task=CheckTasks.check_search_results,
          check_items={
              "nq": nq,
              "ids": insert_ids.copy(),
              "limit": ct.default_limit,
          },
      )
      # check rgA info
      rg_info = {
          "name": rg_name,
          "capacity": config_nodes,
          "num_available_node": config_nodes,
          "num_loaded_replica": {collection_w.name: 1},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=rg_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rg_info,
      )
  
      # 7. transfer query node from rgA to default rg
      self.utility_wrap.transfer_node(
          source=rg_name,
          target=ct.default_resource_group_name,
          num_node=config_nodes,
      )
      # verify search keeps succ
      collection_w.search(
          vectors[:nq],
          ct.default_float_vec_field_name,
          ct.default_search_params,
          ct.default_limit,
          check_task=CheckTasks.check_search_results,
          check_items={
              "nq": nq,
              "ids": insert_ids.copy(),
              "limit": ct.default_limit,
          },
      )
      # check rgA info after transfer
      rg_info = {
          "name": rg_name,
          "capacity": 0,
          "num_available_node": 0,
          "num_loaded_replica": {},
          "num_outgoing_node": {collection_w.name: config_nodes},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=rg_name,
          check_task=CheckTasks.check_rg_property,
          check_items=rg_info,
      )
      default_rg_info = {
          "name": ct.default_resource_group_name,
          "capacity": ct.default_resource_group_capacity,
          "num_available_node": config_nodes,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {collection_w.name: config_nodes},
      }
      self.utility_wrap.describe_resource_group(
          name=ct.default_resource_group_name,
          check_task=CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
  
      # 8. load the collection with default rg
      collection_w.load()
  
imports: import pytest
  from base.client_base import TestcaseBase
  from common import common_func
  from common import common_type
  from common.common_type import CaseLabel, CheckTasks
  from utils.util_pymilvus import *
label_desc: Use image node_id 5 for calling the TestTransferNode obj's underlying member method code with example usage: obj.test_load_collection_with_no_available_node() without return types