File tree Expand file tree Collapse file tree
repl/scala-2.11/src/test/scala/org/apache/spark/repl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -399,6 +399,15 @@ class ReplSuite extends SparkFunSuite {
399399 test(" replicating blocks of object with class defined in repl" ) {
400400 val output = runInterpreter(" local-cluster[2,1,1024]" ,
401401 """
402+ |val timeout = 60000 // 60 seconds
403+ |val start = System.currentTimeMillis
404+ |while(sc.getExecutorStorageStatus.size != 3 &&
405+ | (System.currentTimeMillis - start) < timeout) {
406+ | Thread.sleep(10)
407+ |}
408+ |if (System.currentTimeMillis - start >= timeout) {
409+ | throw new java.util.concurrent.TimeoutException("Executors were not up in 60 seconds")
410+ |}
402411 |import org.apache.spark.storage.StorageLevel._
403412 |case class Foo(i: Int)
404413 |val ret = sc.parallelize((1 to 100).map(Foo), 10).persist(MEMORY_AND_DISK_2)
You can’t perform that action at this time.
0 commit comments