public void stop() {
    LOG.info("-------------------------------------------------------------------------");
    LOG.info("    Shutdown HiveMetastoreServer ");
    LOG.info("-------------------------------------------------------------------------");

    if (clientPool != null) {
      clientPool.close();
    }
    if (server != null) {
      server.stop();
    }
    if (executorService != null) {
      executorService.shutdown();
    }
    if (hiveLocalDir != null) {
      hiveLocalDir.delete();
    }
    if (baseHandler != null) {
      baseHandler.shutdown();
      clearHMSTxnHandlerStaticResource();
    }

    if (client != null) {
      client.close();
    }
    started = false;

    LOG.info("-------------------------------------------------------------------------");
    LOG.info("    HiveMetastoreServer finished");
    LOG.info("-------------------------------------------------------------------------");
  }
Starts a TestHiveMetastore with a provided connection pool size.

@param poolSize The number of threads in the executor pool
amoro-common/src/test/java/org/apache/amoro/hive/HMSMockServer.java