docstr: target: test compact multi delete segments
  method: 1.create collection with shard_num=2
          2.insert data into two segments
          3.delete entities from two segments
          4.compact
          5.load and search
  expected: Verify two delta compaction plans
docstr_tok: ["target",":","test","compact","multi","delete","segments","method",":","1.create","collection","with","shard_num=2","2.insert","data","into","two","segments","3.delete","entities","from","two","segments","4.compact","5.load","and","search","expected",":","Verify","two","delta","compaction","plans"]
code: def test_compact_delete_multi_segments(self):
      """
      target: test compact multi delete segments
      method: 1.create collection with shard_num=2
              2.insert data into two segments
              3.delete entities from two segments
              4.compact
              5.load and search
      expected: Verify two delta compaction plans
      """
      collection_w = self.init_collection_wrap(
          cf.gen_unique_str(prefix)
      )
      df = cf.gen_default_dataframe_data(2 * tmp_nb)
      insert_res, _ = collection_w.insert(df)
      assert collection_w.num_entities == 2 * tmp_nb
  
      collection_w.load()
      log.debug(
          self.utility_wrap.get_query_segment_info(collection_w.name)
      )
  
      delete_ids = [i for i in range(10)]
      expr = f"{ct.default_int64_field_name} in {delete_ids}"
      collection_w.delete(expr)
  
      sleep(ct.compact_retention_duration + 1)
  
      collection_w.compact()
      collection_w.wait_for_compaction_completed()
      c_plans = collection_w.get_compaction_plans()[0]
      assert len(c_plans.plans) == 2
      for plan in c_plans.plans:
          assert len(plan.sources) == 1
  
      collection_w.query(
          f"{ct.default_int64_field_name} in {delete_ids}",
          check_task=CheckTasks.check_query_empty,
      )
  
imports: import threading
  from time import time, sleep
  import pytest
  from pymilvus.grpc_gen.common_pb2 import SegmentState
  from pymilvus.exceptions import MilvusException
  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_log import test_log
label_desc: Use image node_id 2 for calling the TestCompactionOperation obj's underlying member method code with example usage: obj.test_compact_delete_multi_segments() without return types