private void verifyFetchedLog(List<String> logs, String[] expectedLogs) {
    StringBuilder stringBuilder = new StringBuilder();
    for (String log : logs) {
      stringBuilder.append(log);
    }
    String accumulatedLogs = stringBuilder.toString();
    for (String expectedLog : expectedLogs) {
      assertTrue("Failed to find match for " + expectedLog, accumulatedLogs.contains(expectedLog));
    }
  }
Test getting query log when HS2 disable logging.

@throws Exception
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java