Repository: spark
Updated Branches:
  refs/heads/branch-1.5 803339ca4 -> 648074096


[SPARK-11126][SQL] Fix the potential flaky test

The unit test added in #9132 is flaky. This is a follow up PR to add 
`listenerBus.waitUntilEmpty` to fix it.

Author: zsxwing <zsxw...@gmail.com>

Closes #9163 from zsxwing/SPARK-11126-follow-up.

(cherry picked from commit beb8bc1ea588b7f9ab7effff707c0f784421364d)
Signed-off-by: Josh Rosen <joshro...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/64807409
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/64807409
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/64807409

Branch: refs/heads/branch-1.5
Commit: 64807409610b55db12da9fcbdb1c1d2f65eca870
Parents: 803339c
Author: zsxwing <zsxw...@gmail.com>
Authored: Mon Oct 19 00:06:51 2015 -0700
Committer: Josh Rosen <joshro...@databricks.com>
Committed: Mon Oct 19 00:08:02 2015 -0700

----------------------------------------------------------------------
 .../scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/64807409/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
index 60b946b..9593b6f 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/ui/SQLListenerSuite.scala
@@ -312,10 +312,12 @@ class SQLListenerSuite extends SparkFunSuite with 
SharedSQLContext {
   test("SPARK-11126: no memory leak when running non SQL jobs") {
     val previousStageNumber = sqlContext.listener.stageIdToStageMetrics.size
     sqlContext.sparkContext.parallelize(1 to 10).foreach(i => ())
+    sqlContext.sparkContext.listenerBus.waitUntilEmpty(10000)
     // listener should ignore the non SQL stage
     assert(sqlContext.listener.stageIdToStageMetrics.size == 
previousStageNumber)
 
     sqlContext.sparkContext.parallelize(1 to 10).toDF().foreach(i => ())
+    sqlContext.sparkContext.listenerBus.waitUntilEmpty(10000)
     // listener should save the SQL stage
     assert(sqlContext.listener.stageIdToStageMetrics.size == 
previousStageNumber + 1)
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to