spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pwend...@apache.org
Subject [27/37] git commit: Fixed the broken local scheduler test.
Date Tue, 15 Oct 2013 05:27:13 GMT
Fixed the broken local scheduler test.


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

Branch: refs/heads/master
Commit: d9e724e756c371889fe887c0184b24572940a73e
Parents: 37397b7
Author: Reynold Xin <rxin@apache.org>
Authored: Thu Oct 10 23:08:13 2013 -0700
Committer: Reynold Xin <rxin@apache.org>
Committed: Thu Oct 10 23:08:13 2013 -0700

----------------------------------------------------------------------
 .../src/test/scala/org/apache/spark/JobCancellationSuite.scala | 1 +
 .../org/apache/spark/scheduler/local/LocalSchedulerSuite.scala | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/d9e724e7/core/src/test/scala/org/apache/spark/JobCancellationSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/JobCancellationSuite.scala b/core/src/test/scala/org/apache/spark/JobCancellationSuite.scala
index 35d88e4..eca309c 100644
--- a/core/src/test/scala/org/apache/spark/JobCancellationSuite.scala
+++ b/core/src/test/scala/org/apache/spark/JobCancellationSuite.scala
@@ -39,6 +39,7 @@ class JobCancellationSuite extends FunSuite with ShouldMatchers with BeforeAndAf
   with LocalSparkContext {
 
   override def afterEach() {
+    super.afterEach()
     System.clearProperty("spark.scheduler.mode")
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/d9e724e7/core/src/test/scala/org/apache/spark/scheduler/local/LocalSchedulerSuite.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/org/apache/spark/scheduler/local/LocalSchedulerSuite.scala
b/core/src/test/scala/org/apache/spark/scheduler/local/LocalSchedulerSuite.scala
index d46a746..1e676c1 100644
--- a/core/src/test/scala/org/apache/spark/scheduler/local/LocalSchedulerSuite.scala
+++ b/core/src/test/scala/org/apache/spark/scheduler/local/LocalSchedulerSuite.scala
@@ -64,6 +64,7 @@ object TaskThreadInfo {
 class LocalSchedulerSuite extends FunSuite with LocalSparkContext with BeforeAndAfterEach
{
 
   override def afterEach() {
+    super.afterEach()
     System.clearProperty("spark.scheduler.mode")
   }
 
@@ -150,12 +151,13 @@ class LocalSchedulerSuite extends FunSuite with LocalSparkContext with
BeforeAnd
   }
 
   test("Local fair scheduler end-to-end test") {
-    sc = new SparkContext("local[8]", "LocalSchedulerSuite")
-    val sem = new Semaphore(0)
     System.setProperty("spark.scheduler.mode", "FAIR")
     val xmlPath = getClass.getClassLoader.getResource("fairscheduler.xml").getFile()
     System.setProperty("spark.scheduler.allocation.file", xmlPath)
 
+    sc = new SparkContext("local[8]", "LocalSchedulerSuite")
+    val sem = new Semaphore(0)
+
     createThread(10,"1",sc,sem)
     TaskThreadInfo.threadToStarted(10).await()
     createThread(20,"2",sc,sem)


Mime
View raw message