@Test
  public void testQueryProgress() throws Throwable {
    final String SCRIPT_TEXT =
        "set hive.support.concurrency = false;\n"
            + "set hive.server2.logging.operation.level=execution;\n"
            + "select count(*) from " + tableName + ";\n";
    // Check for part of log message as well as part of progress information
    final String EXPECTED_PATTERN = "ELAPSED TIME";
    final String UNEXPECTED_PATTERN = "(?=Reducer 2\\:).*(?=Map 1\\:)";
    testScriptFile(SCRIPT_TEXT, getBaseArgs(miniHS2.getBaseJdbcURL()), OutStream.ERR,
        Arrays.asList(
            new Tuple<>(EXPECTED_PATTERN, true),
            new Tuple<>(UNEXPECTED_PATTERN, false)
        )
    );
  }
Test Beeline could show the query progress for time-consuming query.
@throws Throwable
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java