deniskuzZ commented on code in PR #6412:
URL: https://github.com/apache/hive/pull/6412#discussion_r3637278273
##########
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java:
##########
@@ -128,9 +129,43 @@ public class TestJdbcDriver2 {
private static Connection con;
private static final float floatCompareDelta = 0.0001f;
+ /**
+ * Required prefix of {@link SQLTimeoutException#getMessage()} for a 1s
limit. HS2 may append
+ * {@code ; Query ID: ...} after the base text from {@code HiveSQLException}.
+ */
+ private static final String QUERY_TIMED_OUT_AFTER_1_SECONDS = "Query timed
out after 1 seconds";
+
@Rule public ExpectedException thrown = ExpectedException.none();
@Rule public final TestName testName = new TestName();
+ /**
+ * {@code SET hive.query.timeout.seconds} applies to the whole HS2 session.
Tests such as
+ * {@link #testQueryTimeoutFromSetStatement()} must not leave a short limit
on the shared
+ * {@link #con}, or unrelated tests will see {@link SQLTimeoutException}.
+ */
+ @After
+ public void resetHiveSessionQueryTimeout() {
+ try {
Review Comment:
why do you wrap globally with try-catch. apply catch to the inner statement
--
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]