private void closeSession(SessionState oldSs) throws IOException {
    if (oldSs != null && oldSs.out != null && oldSs.out != System.out) {
      oldSs.out.close();
    }
    if (oldSs != null) {
      oldSs.close();
    }
  }
Clear out any side effects of running tests
itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java