@Test
  public void testHplSqlExitConditionHandler() throws Throwable {
    String scriptText =
        "CREATE PROCEDURE p1()\n" +
            "BEGIN\n" +
            " PRINT('Exit CONDITION Handler invoked.');\n" +
            "END;\n" +
            "DECLARE cnt_condition CONDITION;\n" +
            "DECLARE EXIT HANDLER FOR cnt_condition\n" +
            " p1();\n" +
            "IF 1 <> 2 THEN\n" +
            " SIGNAL cnt_condition;\n" +
            "END IF;";
    testScriptFile(scriptText, args(), "Exit CONDITION Handler invoked.", OutStream.ERR);
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java