You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/03/04 03:00:39 UTC
spark git commit: [SPARK-19816][SQL][TESTS] Fix an issue that
DataFrameCallbackSuite doesn't recover the log level
Repository: spark
Updated Branches:
refs/heads/master 9e5b4ce72 -> fbc405803
[SPARK-19816][SQL][TESTS] Fix an issue that DataFrameCallbackSuite doesn't recover the log level
## What changes were proposed in this pull request?
"DataFrameCallbackSuite.execute callback functions when a DataFrame action failed" sets the log level to "fatal" but doesn't recover it. Hence, tests running after it won't output any logs except fatal logs.
This PR uses `testQuietly` instead to avoid changing the log level.
## How was this patch tested?
Jenkins
Author: Shixiong Zhu <sh...@databricks.com>
Closes #17156 from zsxwing/SPARK-19816.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/fbc40580
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/fbc40580
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/fbc40580
Branch: refs/heads/master
Commit: fbc4058037cf5b0be9f14a7dd28105f7f8151bed
Parents: 9e5b4ce
Author: Shixiong Zhu <sh...@databricks.com>
Authored: Fri Mar 3 19:00:35 2017 -0800
Committer: Xiao Li <ga...@gmail.com>
Committed: Fri Mar 3 19:00:35 2017 -0800
----------------------------------------------------------------------
.../scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/fbc40580/sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
----------------------------------------------------------------------
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
index 9f27d06..7c9ea7d 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/util/DataFrameCallbackSuite.scala
@@ -60,7 +60,7 @@ class DataFrameCallbackSuite extends QueryTest with SharedSQLContext {
spark.listenerManager.unregister(listener)
}
- test("execute callback functions when a DataFrame action failed") {
+ testQuietly("execute callback functions when a DataFrame action failed") {
val metrics = ArrayBuffer.empty[(String, QueryExecution, Exception)]
val listener = new QueryExecutionListener {
override def onFailure(funcName: String, qe: QueryExecution, exception: Exception): Unit = {
@@ -75,8 +75,6 @@ class DataFrameCallbackSuite extends QueryTest with SharedSQLContext {
val errorUdf = udf[Int, Int] { _ => throw new RuntimeException("udf error") }
val df = sparkContext.makeRDD(Seq(1 -> "a")).toDF("i", "j")
- // Ignore the log when we are expecting an exception.
- sparkContext.setLogLevel("FATAL")
val e = intercept[SparkException](df.select(errorUdf($"i")).collect())
assert(metrics.length == 1)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org