@Override
  protected void stopServer(int port) throws Exception {
    super.stopServer(port);
    MetaStoreTestUtils.close(thriftPort);
  }
Test using the servlet server created by the MetaStore.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/properties/HMSServletTestA.java