docstr: Method:
  1. prepare a collection to search
  2. create a rgA
  3. transfer the node from default rg to rgA
  4. insert to make some growing
  verify search keeps succ
  5. transfer the node back to default rg
  6. insert to make some growing
  verify search keeps succ
docstr_tok: ["Method",":","1.","prepare","a","collection","to","search","2.","create","a","rgA","3.","transfer","the","node","from","default","rg","to","rgA","4.","insert","to","make","some","growing","verify","search","keeps","succ","5.","transfer","the","node","back","to","default","rg","6.","insert","to","make","some","growing","verify","search","keeps","succ"]
code: def test_transfer_node_from_default_rg(self, with_growing):
      """
      Method:
      1. prepare a collection to search
      2. create a rgA
      3. transfer the node from default rg to rgA
      4. insert to make some growing
      verify search keeps succ
      5. transfer the node back to default rg
      6. insert to make some growing
      verify search keeps succ
      """
      # create a collectionA and insert data
      dim = 128
      collection_w, _, _, insert_ids, _ = self.init_collection_general(
          insert_data=True, dim=dim
      )
      if with_growing:
          res, _ = collection_w.insert(cf.gen_default_list_data(nb=100))
          insert_ids.extend(res.primary_keys)
      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,
          },
      )
      default_rg_info = {
          "name": ct.default_resource_group_name,
          "capacity": ct.default_resource_group_capacity,
          "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=ct.default_resource_group_name,
          check_task=CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
  
      # create a rgA
      rg_name = cf.gen_unique_str("rg")
      self.init_resource_group(rg_name)
      # transfer query node from default to rgA
      self.utility_wrap.transfer_node(
          source=ct.default_resource_group_name,
          target=rg_name,
          num_node=1,
      )
      if with_growing:
          res, _ = collection_w.insert(cf.gen_default_list_data(nb=100))
          insert_ids.extend(res.primary_keys)
  
      # verify rg state
      rg_info = {
          "name": rg_name,
          "capacity": 1,
          "num_available_node": 1,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {collection_w.name: 1},
      }
      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 - 1,
          "num_loaded_replica": {collection_w.name: 1},
          "num_outgoing_node": {collection_w.name: 1},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=ct.default_resource_group_name,
          check_task=CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
  
      # verify search keeps succ after transfer
      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,
          },
      )
  
      # transfer query node back to default
      self.utility_wrap.transfer_node(
          source=rg_name,
          target=ct.default_resource_group_name,
          num_node=1,
      )
      if with_growing:
          res, _ = collection_w.insert(cf.gen_default_list_data(nb=100))
          insert_ids.extend(res.primary_keys)
  
      # 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,
          },
      )
      # verify rg state
      rg_info = {
          "name": rg_name,
          "capacity": 0,
          "num_available_node": 0,
          "num_loaded_replica": {},
          "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,
      )
      default_rg_info = {
          "name": ct.default_resource_group_name,
          "capacity": ct.default_resource_group_capacity,
          "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=ct.default_resource_group_name,
          check_task=CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
  
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 2 for calling the TestTransferNode obj's underlying member method code with example usage: obj.test_transfer_node_from_default_rg(with_growing) without return types