public void afterTest(QTestUtil qt) throws Exception {

    // special qtest logic, which doesn't fit quite well into Derby.after()
    if (isDerby()) {
      TestTxnDbUtil.cleanDb(qt.getConf());
    }
  }
QTestMetaStoreHandler is responsible for wrapping the logic of handling different metastore
databases in qtests.
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestMetaStoreHandler.java