Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/22149#discussion_r235331966 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/ScriptTransformationSuite.scala --- @@ -170,3 +198,17 @@ private case class ExceptionInjectingOperator(child: SparkPlan) extends UnaryExe override def outputPartitioning: Partitioning = child.outputPartitioning } + +private class TestUncaughtExceptionHandler extends Thread.UncaughtExceptionHandler with Logging { + + @volatile private var _exception: Throwable = _ + + def exception: Option[Throwable] = Option(_exception) + + def cleanStatus: Unit = _exception = null + + override def uncaughtException(t: Thread, e: Throwable): Unit = { + logError(s"Thread ${t.getName} handle by TestUncaughtExceptionHandler") --- End diff -- Do we need to do logging in test?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org