private HiveConf newHiveConf(int port) {
    Configuration conf = new Configuration(false);
    HiveConf newHiveConf = new HiveConf(conf, HMSMockServer.class);
    newHiveConf.set(HiveConf.ConfVars.METASTOREURIS.varname, "thrift://localhost:" + port);
    newHiveConf.set(
        HiveConf.ConfVars.METASTOREWAREHOUSE.varname,
        "file:///" + hiveLocalDir.getAbsolutePath().replace("\\", "/"));
    newHiveConf.set(HiveConf.ConfVars.METASTORE_TRY_DIRECT_SQL.varname, "false");
    newHiveConf.set(
        HiveConf.ConfVars.METASTORE_DISALLOW_INCOMPATIBLE_COL_TYPE_CHANGES.varname, "false");
    newHiveConf.set(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION.varname, "false");
    newHiveConf.set("datanucleus.schema.autoCreateTables", "true");
    newHiveConf.set("hive.metastore.client.capability.check", "false");
    newHiveConf.set("iceberg.hive.client-pool-size", "2");
    return newHiveConf;
  }
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