InvisibleProgrammer commented on code in PR #6412:
URL: https://github.com/apache/hive/pull/6412#discussion_r3149949149
##########
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java:
##########
@@ -2680,6 +2754,82 @@ public void testQueryTimeout() throws Exception {
stmt.close();
}
+ /**
+ * When only {@code hive.query.timeout.seconds} applies (no {@link
Statement#setQueryTimeout(int)}),
+ * the client must still report the real limit in {@link
SQLTimeoutException#getMessage()} (before
+ * HIVE-28265 some paths wrongly showed "after 0 seconds"). Message must
begin with
+ * {@link #QUERY_TIMED_OUT_AFTER_1_SECONDS}; HS2 may append {@code ; Query
ID: ...}.
+ */
+ @Test
+ public void testQueryTimeoutMessageUsesHiveConf() throws Exception {
+ String udfName = SleepMsUDF.class.getName();
+ Statement stmt1 = con.createStatement();
+ stmt1.execute("create temporary function sleepMsUDF as '" + udfName + "'");
+ stmt1.close();
+
+ Statement stmt = con.createStatement();
+ stmt.execute("set hive.query.timeout.seconds=1s");
Review Comment:
The name and the description of the test case suggests it gets the timeout
from HiveConf. But it sets the timeout with a set command, like in
`testQueryTimeoutMessagePersistedAcrossStatements`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]