public void tearDown() {
      try {
        if (!isClosed) {
          super.close();
        }
        isClosed = true;
      } catch (Exception e) {
        LOG.warn("Error closing hive metastore client. Ignored.", e);
      }
    }
Close the underlying objects irrespective of whether they are in use or not.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HiveClientCache.java