@Test
  public void testSetHplsqlOnErrorSetError() throws Throwable {
    String scriptText =
        "SET hplsql.onerror='seterror';\n" +
            "insert into abc values('Tbl Not Exists');\n" +
            "if SQLCODE < 0\n" + " PRINT 'SQL Error...';";
    testScriptFile(scriptText, args(), "SessionState: SQL Error...", OutStream.ERR);
  }
Start up a local Hive Server 2 for these tests
itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java