public static <T extends AutoCloseable> T makeItCloseQuietly(T t) {
    InvocationHandler handler =
        (proxy, method, args) -> {
          try {
            if (method.getName().equals("close")) {
              try {
                method.invoke(t, args);
              } catch (Throwable e) {
                LOGGER.warn("Exception happens during close(): ", e);
              }
              return null;
            } else {
              return method.invoke(t, args);
            }
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          }
        };
    return (T)
        Proxy.newProxyInstance(
            t.getClass().getClassLoader(), t.getClass().getInterfaces(), handler);
  }
Ignore all exceptions during close()

@param t target object
@return object which will close without exception
integration-test/src/test/java/org/apache/iotdb/util/MagicUtils.java