ulysses-you commented on a change in pull request #30481:
URL: https://github.com/apache/spark/pull/30481#discussion_r537345746
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerWithSparkContextSuite.scala
##########
@@ -79,6 +84,45 @@ trait ThriftServerWithSparkContextSuite extends
SharedThriftServer {
"java.lang.NumberFormatException: invalid input syntax for type
numeric: 1.2"))
}
}
+
+ test("SPARK-33526: Add config to control if cancel invoke interrupt task on
thriftserver") {
+ withJdbcStatement { statement =>
+ val forceCancel = new AtomicBoolean(false)
+ val listener = new SparkListener {
+ override def onTaskEnd(taskEnd: SparkListenerTaskEnd): Unit = {
+ taskEnd.reason match {
+ case _: TaskKilled =>
+ if (forceCancel.get()) {
+ assert(System.currentTimeMillis() -
taskEnd.taskInfo.launchTime < 1000)
+ } else {
+ assert(System.currentTimeMillis() -
taskEnd.taskInfo.launchTime >= 2000)
+ }
+ case _ =>
Review comment:
Updated.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]