docstr: Method:
  1. create a partition and insert data
  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 partition 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 partition without rg specified
  verify load succ
docstr_tok: ["Method",":","1.","create","a","partition","and","insert","data","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","partition","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","partition","without","rg","specified","verify","load","succ"]
code: def test_load_partition_with_no_available_node(self):
      """
      Method:
      1. create a partition and insert data
      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 partition 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 partition without rg specified
      verify load succ
      """
      self._connect()
      dim = ct.default_dim
      # 1. create a partition and insert data
      collection_w = self.init_collection_wrap()
      partition_name = cf.gen_unique_str("par")
      partition_w = self.init_partition_wrap(
          collection_w, partition_name
      )
      data = cf.gen_default_list_data(nb=2000)
      ins_res, _ = partition_w.insert(data)
      collection_w.create_index(
          ct.default_float_vec_field_name, ct.default_flat_index
      )
      # 3. create a rgA
      rg_name = cf.gen_unique_str("rg")
      self.init_resource_group(rg_name)
      # 4. transfer all query nodes 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 partitions, err=failed to spawn replica for collection[nodes not enough]",
      }
      partition_w.load(check_task=CheckTasks.err_res, check_items=error)
  
      # 6. load the collection with rgA
      partition_w.load(_resource_groups=[rg_name])
      nq = 5
      vectors = [
          [random.random() for _ in range(dim)] for _ in range(nq)
      ]
      # verify search succ
      partition_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": ins_res.primary_keys,
              "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,
      )
  
      # verify replica
      replicas = partition_w.get_replicas()
      num_nodes_for_replicas = 0
      assert len(replicas[0].groups) == 1
      for rep in replicas[0].groups:
          assert rep.resource_group == rg_name
          assert rep.num_outbound_node == {}
          num_nodes_for_replicas += len(rep.group_nodes)
      assert num_nodes_for_replicas == config_nodes
  
      # 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
      partition_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": ins_res.primary_keys,
              "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 without rg specified
      partition_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 8 for calling the TestTransferNode obj's underlying member method code with example usage: obj.test_load_partition_with_no_available_node() without return types