diff options
author | Grega Kespret <grega@celtra.com> | 2013-12-10 11:43:42 +0100 |
---|---|---|
committer | Grega Kespret <grega@celtra.com> | 2013-12-10 11:43:42 +0100 |
commit | 558af873340087cad79630ec5c498672c5ea3c4f (patch) | |
tree | 00dd95cbbcb4f8e633d88375f4ebf02de45490fc | |
parent | 14a1df65729a3c7e5fd54f79424626a540aef5d4 (diff) | |
download | spark-558af873340087cad79630ec5c498672c5ea3c4f.tar.gz spark-558af873340087cad79630ec5c498672c5ea3c4f.tar.bz2 spark-558af873340087cad79630ec5c498672c5ea3c4f.zip |
Fix tests.
-rw-r--r-- | core/src/test/scala/org/apache/spark/DistributedSuite.scala | 2 | ||||
-rw-r--r-- | core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/test/scala/org/apache/spark/DistributedSuite.scala b/core/src/test/scala/org/apache/spark/DistributedSuite.scala index 480bac84f3..816cbee3e0 100644 --- a/core/src/test/scala/org/apache/spark/DistributedSuite.scala +++ b/core/src/test/scala/org/apache/spark/DistributedSuite.scala @@ -122,7 +122,7 @@ class DistributedSuite extends FunSuite with ShouldMatchers with BeforeAndAfter sc.parallelize(1 to 10, 10).foreach(x => println(x / 0)) } assert(thrown.getClass === classOf[SparkException]) - assert(thrown.getMessage.contains("more than 4 times")) + assert(thrown.getMessage.contains("failed 4 times")) } test("caching") { diff --git a/core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala b/core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala index b97f2b19b5..29c4cc5d9c 100644 --- a/core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala +++ b/core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala @@ -283,7 +283,7 @@ class ClusterTaskSetManagerSuite extends FunSuite with LocalSparkContext with Lo // Fail the task MAX_TASK_FAILURES times, and check that the task set is aborted // after the last failure. - (0 until manager.MAX_TASK_FAILURES).foreach { index => + (1 to manager.MAX_TASK_FAILURES).foreach { index => val offerResult = manager.resourceOffer("exec1", "host1", 1, ANY) assert(offerResult != None, "Expect resource offer on iteration %s to return a task".format(index)) |