spark git commit: [SPARK-11126][SQL] Fix the potential flaky test

2015-10-19 Thread joshrosen
Repository: spark
Updated Branches:
  refs/heads/master d3180c25d -> beb8bc1ea


[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 

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


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

Branch: refs/heads/master
Commit: beb8bc1ea588b7f9ab7e707c0f784421364d
Parents: d3180c2
Author: zsxwing 
Authored: Mon Oct 19 00:06:51 2015 -0700
Committer: Josh Rosen 
Committed: Mon Oct 19 00:06:51 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/beb8bc1e/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 03bcee9..c15aac7 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
@@ -316,10 +316,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(1)
 // 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(1)
 // 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



spark git commit: [SPARK-11126][SQL] Fix the potential flaky test

2015-10-19 Thread joshrosen
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 

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

(cherry picked from commit beb8bc1ea588b7f9ab7e707c0f784421364d)
Signed-off-by: Josh Rosen 


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 
Authored: Mon Oct 19 00:06:51 2015 -0700
Committer: Josh Rosen 
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(1)
 // 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(1)
 // 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