docstr: target: test compact when no segments merge
  method: 1.create with shard_num=1
          2.insert and flush
          3.compact and search
  expected: No exception and compact plans
docstr_tok: ["target",":","test","compact","when","no","segments","merge","method",":","1.create","with","shard_num=1","2.insert","and","flush","3.compact","and","search","expected",":","No","exception","and","compact","plans"]
code: def test_compact_no_merge(self):
      """
      target: test compact when no segments merge
      method: 1.create with shard_num=1
              2.insert and flush
              3.compact and search
      expected: No exception and compact plans
      """
      # create collection
      collection_w = self.init_collection_wrap(
          name=cf.gen_unique_str(prefix), shards_num=1
      )
      df = cf.gen_default_dataframe_data(tmp_nb)
      collection_w.insert(df)
      assert collection_w.num_entities == tmp_nb
  
      collection_w.create_index(
          ct.default_float_vec_field_name, ct.default_index
      )
      collection_w.load()
  
      seg_before, _ = self.utility_wrap.get_query_segment_info(
          collection_w.name
      )
  
      collection_w.compact()
      collection_w.wait_for_compaction_completed()
      c_plans, _ = collection_w.get_compaction_plans()
      assert len(c_plans.plans) == 1
      assert [seg_before[0].segmentID] == c_plans.plans[0].sources
  
      collection_w.release()
      collection_w.load()
      seg_after, _ = self.utility_wrap.get_query_segment_info(
          collection_w.name
      )
      assert seg_after[0].segmentID == c_plans.plans[0].target
  
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 12 for calling the TestCompactionOperation obj's underlying member method code with example usage: obj.test_compact_no_merge() without return types