class_docstr: ******************************************************************
    The following cases are used to test `create_partition` function 
  ******************************************************************
class_docstr_tok: ["*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","The","following","cases","are","used","to","test","`","create_partition","`","function","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*","*"]
docstr: target: return the same row count after server restart
  method: call function: create collection, then insert/flush, restart server and assert row count
  expected: row count keep the same
docstr_tok: ["target",":","return","the","same","row","count","after","server","restart","method",":","call","function",":","create","collection",",","then","insert\/flush",",","restart","server","and","assert","row","count","expected",":","row","count","keep","the","same"]
code: def _test_insert_flush(self, connect, collection, args):
      """
      target: return the same row count after server restart
      method: call function: create collection, then insert/flush, restart server and assert row count
      expected: row count keep the same
      """
      ids = connect.bulk_insert(collection, default_entities)
      connect.flush([collection])
      ids = connect.bulk_insert(collection, default_entities)
      connect.flush([collection])
      res_count = connect.count_entities(collection)
      logging.getLogger().info(res_count)
      assert res_count == 2 * default_nb
      # restart server
      logging.getLogger().info("Start restart server")
      assert restart_server(args["service_name"])
      # assert row count again
      new_connect = get_milvus(
          args["ip"], args["port"], handler=args["handler"]
      )
      res_count = new_connect.count_entities(collection)
      logging.getLogger().info(res_count)
      assert res_count == 2 * default_nb
  
imports: import time
  import random
  import pdb
  import threading
  import logging
  import json
  from multiprocessing import Pool, Process
  import pytest
  from utils.util_pymilvus import get_milvus, restart_server, gen_entities, gen_unique_str, default_nb
  from common.constants import default_fields, default_entities
  from common.common_type import CaseLabel
label_desc: Use image node_id 2 for calling the TestRestartBase obj's underlying member method code with example usage: obj._test_insert_flush(connect, collection, args) without return types