ashniku commented on code in PR #6412:
URL: https://github.com/apache/hive/pull/6412#discussion_r3111696089


##########
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java:
##########
@@ -2661,7 +2699,8 @@ public void testQueryTimeout() throws Exception {
           + " t2 on t1.under_col = t2.under_col");
       fail("Expecting SQLTimeoutException");
     } catch (SQLTimeoutException e) {
-      assertNotNull(e);
+      assertTimeoutMessageShowsOneSecond(

Review Comment:
   @InvisibleProgrammer The old assertNotNull(e) didn’t validate the message. 
HIVE-28265 fixes cases where the message incorrectly said “after 0 seconds” 
while the real limit was 1 second. We set the limit to 1s in both tests 
(setQueryTimeout(1) vs SET hive.query.timeout.seconds=1s) and assert the 
message starts with Query timed out after 1 seconds and does not contain after 
0 seconds. The 1 is the configured timeout, not an arbitrary magic number—if we 
used 2s, we’d assert 2 seconds. testURLWithFetchSize is a different feature 
(URL fetchSize); the analogy is only “set config → assert behavior.”



-- 
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]

Reply via email to