zsxwing commented on a change in pull request #25868: [SPARK-28527][SQL][TEST]
Enable ThriftServerQueryTestSuite
URL: https://github.com/apache/spark/pull/25868#discussion_r327506731
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala
##########
@@ -65,10 +67,19 @@ class ThriftServerQueryTestSuite extends SQLQueryTestSuite
{
logInfo("HiveThriftServer2 started successfully")
}
- override def afterEach(): Unit = {
- hiveServer2.stop()
+ override def afterAll(): Unit = {
+ try {
+ hiveServer2.stop()
+ } finally {
+ super.afterAll()
+ }
}
+ override def sparkConf: SparkConf = super.sparkConf
+ // Hive Thrift server should not executes SQL queries in an asynchronous
way
+ // because we may set session configuration.
+ .set(HiveUtils.HIVE_THRIFT_SERVER_ASYNC, false)
Review comment:
Does this mean this is broken and the user should also turn if off? If so,
should we change the default value? Otherwise, our tests are actually testing
something that's rarely used.
> Hive Thrift server should not executes SQL queries in an asynchronous way
because we may set session configuration.
Could you clarify what's the exact issue? Is it because the background
thread is missing some thread-local variables? Can we copy them from the parent
thread here?
https://github.com/apache/spark/blob/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala#L186
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]