docstr: target: test inject memory stress into all etcd pods
  method: 1.Deploy milvus and limit etcd memory resource 1Gi witl all mode
          2.Continuously and concurrently do milvus operations
          3.Inject memory stress chaos 51024Mi
          4.After duration, delete chaos stress
  expected: Verify milvus operation succ rate
docstr_tok: ["target",":","test","inject","memory","stress","into","all","etcd","pods","method",":","1.Deploy","milvus","and","limit","etcd","memory","resource","1Gi","witl","all","mode","2.Continuously","and","concurrently","do","milvus","operations","3.Inject","memory","stress","chaos","51024Mi","4.After","duration",",","delete","chaos","stress","expected",":","Verify","milvus","operation","succ","rate"]
code: def test_chaos_memory_stress_etcd(self, chaos_yaml):
      """
      target: test inject memory stress into all etcd pods
      method: 1.Deploy milvus and limit etcd memory resource 1Gi witl all mode
              2.Continuously and concurrently do milvus operations
              3.Inject memory stress chaos 51024Mi
              4.After duration, delete chaos stress
      expected: Verify milvus operation succ rate
      """
      mic_checkers = {
          Op.create: CollectionCreateChecker(),
          Op.insert: InsertFlushChecker(),
          Op.flush: InsertFlushChecker(flush=True),
          Op.index: IndexCreateChecker(),
          Op.search: SearchChecker(),
          Op.query: QueryChecker(),
      }
      # start thread keep running milvus op
      start_monitor_threads(mic_checkers)
  
      # parse chaos object
      chaos_config = cc.gen_experiment_config(chaos_yaml)
      # duration = chaos_config["spec"]["duration"]
      meta_name = chaos_config.get("metadata").get("name")
      duration = chaos_config.get("spec").get("duration")
  
      # apply chaos object
      chaos_res = CusResource(
          kind=chaos_config["kind"],
          group=constants.CHAOS_GROUP,
          version=constants.CHAOS_VERSION,
          namespace=constants.CHAOS_NAMESPACE,
      )
      chaos_res.create(chaos_config)
      log.info("Chaos injected")
  
      # convert string duration time to an int number in seconds
      if isinstance(duration, str):
          duration = (
              duration.replace("h", "*3600+")
              .replace("m", "*60+")
              .replace("s", "*1+")
              + "+0"
          )
      else:
          log.error("Duration must be string type")
  
      # Delete experiment after it's over
      timer = threading.Timer(
          interval=eval(duration),
          function=chaos_res.delete,
          args=(meta_name, False),
      )
      timer.start()
      timer.join()
  
      # output milvus op succ rate
      for k, ch in mic_checkers.items():
          log.debug(f"Succ rate of {k.value}: {ch.succ_rate()}")
          assert ch.succ_rate() == 1.0
  
imports: import random
  import threading
  import time
  from time import sleep
  import pytest
  import datetime
  from pymilvus import connections
  from base.collection_wrapper import ApiCollectionWrapper
  from base.utility_wrapper import ApiUtilityWrapper
  from chaos.checker import Op, CollectionCreateChecker, InsertFlushChecker, IndexCreateChecker, SearchChecker, QueryChecker
  from common.cus_resource_opts import CustomResourceOperations
  from common import common_func
  from common import common_type
  from chaos import chaos_commons
  from chaos.chaos_commons import gen_experiment_config, get_chaos_yamls, start_monitor_threads
  from common.common_type import CaseLabel, CheckTasks
  from chaos import constants
  from utils.util_log import test_log
  from utils.util_k8s import get_querynode_id_pod_pairs
label_desc: Use image node_id 5 for calling the TestChaosData obj's underlying member method code with example usage: obj.test_chaos_memory_stress_etcd(chaos_yaml) without return types