Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/186#discussion_r11713788
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -20,27 +20,29 @@ package org.apache.spark.scheduler
     import scala.Tuple2
     import scala.collection.mutable.{HashSet, HashMap, Map}
     import scala.language.reflectiveCalls
    +import scala.collection.mutable.{HashMap, Map, HashSet}
     
    +import akka.actor._
    +import akka.testkit.{TestKit, ImplicitSender, TestActorRef}
     import org.scalatest.{BeforeAndAfter, FunSuite}
    +import org.scalatest.matchers.MustMatchers
     
     import org.apache.spark._
     import org.apache.spark.rdd.RDD
     import org.apache.spark.scheduler.SchedulingMode.SchedulingMode
     import org.apache.spark.storage.{BlockId, BlockManagerId, 
BlockManagerMaster}
     
    -/**
    - * Tests for DAGScheduler. These tests directly call the event processing 
functions in DAGScheduler
    - * rather than spawning an event loop thread as happens in the real code. 
They use EasyMock
    - * to mock out two classes that DAGScheduler interacts with: TaskScheduler 
(to which TaskSets are
    - * submitted) and BlockManagerMaster (from which cache locations are 
retrieved and to which dead
    - * host notifications are sent). In addition, tests may check for side 
effects on a non-mocked
    - * MapOutputTracker instance.
    - *
    - * Tests primarily consist of running DAGScheduler#processEvent and
    - * DAGScheduler#submitWaitingStages (via test utility functions like 
runEvent or respondToTaskSet)
    - * and capturing the resulting TaskSets from the mock TaskScheduler.
    - */
    -class DAGSchedulerSuite extends FunSuite with BeforeAndAfter with 
LocalSparkContext {
    +class BuggyDAGEventProcessActor extends Actor {
    +  val state = 0
    +  def receive = {
    +    case _ => throw new SparkException("error")
    +  }
    +}
    +
    +class DAGSchedulerSuite
    +  extends TestKit(ActorSystem("DAGSchedulerSuite")) with FunSuite with 
MustMatchers
    --- End diff --
    
    nit: I would just do `class DAGSchedulerSuite extends ...`, and spill over 
to new lines normally


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to