public void clearKeysCreatedInTests() {
    if (miniClusters.getHdfsEncryptionShim() == null) {
      return;
    }
    try {
      for (String keyAlias : miniClusters.getHdfsEncryptionShim().getKeys()) {
        miniClusters.getHdfsEncryptionShim().deleteKey(keyAlias);
      }
    } catch (IOException e) {
      LOG.error("Fail to clean the keys created in test due to the error", e);
    }
  }
Clear out any side effects of running tests
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java