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(accumulatedLogs.contains(expectedLog));
    }
  }
Test getting query log when HS2 disable logging.

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