mdayakar commented on code in PR #5916: URL: https://github.com/apache/hive/pull/5916#discussion_r2179866227
########## itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java: ########## @@ -1052,17 +1052,22 @@ public void testHplSqlContinueConditionHandler() throws Throwable { @Test public void testHplSqlExitConditionHandler() throws Throwable { String scriptText = - "CREATE PROCEDURE p1()\n" + + "DROP TABLE IF EXISTS result;\n" + + "CREATE TABLE result (s string);\n" + + "CREATE PROCEDURE p1()\n" + "BEGIN\n" + - " PRINT('Exit CONDITION Handler invoked.');\n" + + " INSERT INTO result VALUES('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); + "CREATE PROCEDURE p2()" + + "BEGIN\n" + + " DECLARE exit_condition CONDITION;\n" + + " DECLARE EXIT HANDLER FOR exit_condition\n" + + " p1();\n" + + " SIGNAL exit_condition;\n" + + "END;\n" + + "p2();" + Review Comment: Here in old testcase, the exit handler was getting invoked but somehow the print is not getting captured. So I changed it to use as a part of a procedure(which is normal use of HPLSQL) now its getting triggered and I could see in the Outstream.ERR but asserting there again will be same issue as its logs the triggered HPLSQL statements also. So now I changed to use inserting the string data into a table when exit handler is invoked and asserting the same by quering the data from that table. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org