Repository: spark
Updated Branches:
  refs/heads/master 20a61dbd9 -> ebbf85f07


[SPARK-7989] [SPARK-10651] [CORE] [TESTS] Increase timeout to fix flaky tests

I noticed only one block manager registered with master in an unsuccessful 
build 
(https://amplab.cs.berkeley.edu/jenkins/job/Spark-Master-SBT/AMPLAB_JENKINS_BUILD_PROFILE=hadoop2.2,label=spark-test/3534/)
```
15/09/16 13:02:30.981 pool-1-thread-1-ScalaTest-running-BroadcastSuite INFO 
SparkContext: Running Spark version 1.6.0-SNAPSHOT
...
15/09/16 13:02:38.133 sparkDriver-akka.actor.default-dispatcher-19 INFO 
BlockManagerMasterEndpoint: Registering block manager localhost:48196 with 
530.3 MB RAM, BlockManagerId(0, localhost, 48196)
```
In addition, the first block manager needed 7+ seconds to start. But the test 
expected 2 block managers so it failed.

However, there was no exception in this log file. So I checked a successful 
build 
(https://amplab.cs.berkeley.edu/jenkins/job/Spark-Master-SBT/3536/AMPLAB_JENKINS_BUILD_PROFILE=hadoop2.2,label=spark-test/)
 and it needed 4-5 seconds to set up the local cluster:
```
15/09/16 18:11:27.738 sparkWorker1-akka.actor.default-dispatcher-5 INFO Worker: 
Running Spark version 1.6.0-SNAPSHOT
...
15/09/16 18:11:30.838 sparkDriver-akka.actor.default-dispatcher-20 INFO 
BlockManagerMasterEndpoint: Registering block manager localhost:54202 with 
530.3 MB RAM, BlockManagerId(1, localhost, 54202)
15/09/16 18:11:32.112 sparkDriver-akka.actor.default-dispatcher-20 INFO 
BlockManagerMasterEndpoint: Registering block manager localhost:32955 with 
530.3 MB RAM, BlockManagerId(0, localhost, 32955)
```
In this build, the first block manager needed only 3+ seconds to start.

Comparing these two builds, I guess it's possible that the local cluster in 
`BroadcastSuite` cannot be ready in 10 seconds if the Jenkins worker is busy. 
So I just increased the timeout to 60 seconds to see if this can fix the issue.

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

Closes #8813 from zsxwing/fix-BroadcastSuite.


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

Branch: refs/heads/master
Commit: ebbf85f07bb8de0d566f1ae4b41f26421180bebe
Parents: 20a61db
Author: zsxwing <zsxw...@gmail.com>
Authored: Mon Sep 21 11:39:04 2015 -0700
Committer: Xiangrui Meng <m...@databricks.com>
Committed: Mon Sep 21 11:39:04 2015 -0700

----------------------------------------------------------------------
 .../test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala  | 2 +-
 .../src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala | 2 +-
 .../org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/ebbf85f0/core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala
----------------------------------------------------------------------
diff --git 
a/core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala 
b/core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala
index e846a72..231f463 100644
--- a/core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala
+++ b/core/src/test/scala/org/apache/spark/ExternalShuffleServiceSuite.scala
@@ -61,7 +61,7 @@ class ExternalShuffleServiceSuite extends ShuffleSuite with 
BeforeAndAfterAll {
     // local blocks from the local BlockManager and won't send requests to 
ExternalShuffleService.
     // In this case, we won't receive FetchFailed. And it will make this test 
fail.
     // Therefore, we should wait until all slaves are up
-    sc.jobProgressListener.waitUntilExecutorsUp(2, 10000)
+    sc.jobProgressListener.waitUntilExecutorsUp(2, 60000)
 
     val rdd = sc.parallelize(0 until 1000, 10).map(i => (i, 1)).reduceByKey(_ 
+ _)
 

http://git-wip-us.apache.org/repos/asf/spark/blob/ebbf85f0/core/src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala
----------------------------------------------------------------------
diff --git 
a/core/src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala 
b/core/src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala
index fb7a8ae..ba21075 100644
--- a/core/src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala
+++ b/core/src/test/scala/org/apache/spark/broadcast/BroadcastSuite.scala
@@ -311,7 +311,7 @@ class BroadcastSuite extends SparkFunSuite with 
LocalSparkContext {
         new SparkContext("local-cluster[%d, 1, 1024]".format(numSlaves), 
"test", broadcastConf)
       // Wait until all salves are up
       try {
-        _sc.jobProgressListener.waitUntilExecutorsUp(numSlaves, 10000)
+        _sc.jobProgressListener.waitUntilExecutorsUp(numSlaves, 60000)
         _sc
       } catch {
         case e: Throwable =>

http://git-wip-us.apache.org/repos/asf/spark/blob/ebbf85f0/core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
----------------------------------------------------------------------
diff --git 
a/core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
 
b/core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
index d1e23ed..9fa8859 100644
--- 
a/core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
+++ 
b/core/src/test/scala/org/apache/spark/scheduler/SparkListenerWithClusterSuite.scala
@@ -43,7 +43,7 @@ class SparkListenerWithClusterSuite extends SparkFunSuite 
with LocalSparkContext
 
     // This test will check if the number of executors received by 
"SparkListener" is same as the
     // number of all executors, so we need to wait until all executors are up
-    sc.jobProgressListener.waitUntilExecutorsUp(2, 10000)
+    sc.jobProgressListener.waitUntilExecutorsUp(2, 60000)
 
     val rdd1 = sc.parallelize(1 to 100, 4)
     val rdd2 = rdd1.map(_.toString)


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

Reply via email to