@Test
  public void testBeelineWithForce() throws Throwable {
    final String SCRIPT_TEXT = "drop table does_not_exist;\ncreate table incomplete_syntax(a, string, );\n "
        + "drop table if exists new_table;\n create table new_table(foo int, bar string);\n "
        + "desc new_table;\n";
    final String EXPECTED_PATTERN = "2 rows selected";
    List<String> argList = getBaseArgs(miniHS2.getBaseJdbcURL());
    argList.add("--force");
    testScriptFile(SCRIPT_TEXT, argList, OutStream.ERR, EXPECTED_PATTERN, true);
  }
Attempt to execute Beeline with force option to continue running script even after errors.
Test for presence of an expected pattern to match the output of a valid command at the end.
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java