Fix tests.

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

Branch: refs/heads/master
Commit: 558af873340087cad79630ec5c498672c5ea3c4f
Parents: 14a1df6
Author: Grega Kespret <[email protected]>
Authored: Tue Dec 10 11:43:42 2013 +0100
Committer: Grega Kespret <[email protected]>
Committed: Tue Dec 10 11:43:42 2013 +0100

----------------------------------------------------------------------
 core/src/test/scala/org/apache/spark/DistributedSuite.scala        | 2 +-
 .../spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/558af873/core/src/test/scala/org/apache/spark/DistributedSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/DistributedSuite.scala 
b/core/src/test/scala/org/apache/spark/DistributedSuite.scala
index 480bac8..816cbee 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") {

http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/558af873/core/src/test/scala/org/apache/spark/scheduler/cluster/ClusterTaskSetManagerSuite.scala
----------------------------------------------------------------------
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 b97f2b1..29c4cc5 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))

Reply via email to