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

    https://github.com/apache/spark/pull/15505#discussion_r95691071
  
    --- Diff: 
core/src/test/scala/org/apache/spark/scheduler/DAGSchedulerSuite.scala ---
    @@ -517,6 +518,32 @@ class DAGSchedulerSuite extends SparkFunSuite with 
LocalSparkContext with Timeou
         assertDataStructuresEmpty()
       }
     
    +  test("unserializable partition") {
    +    val shuffleMapRdd = new MyRDD(sc, 2, Nil)
    +    val shuffleDep = new ShuffleDependency(shuffleMapRdd, new Partitioner {
    +      override def numPartitions = 1
    +
    +      override def getPartition(key: Any) = 1
    +
    +      @throws(classOf[IOException])
    +      private def writeObject(out: ObjectOutputStream): Unit = {
    +        throw new NotSerializableException()
    +      }
    +
    +      @throws(classOf[IOException])
    +      private def readObject(in: ObjectInputStream): Unit = {}
    +    })
    +
    +    // Submit a map stage by itself
    +    submitMapStage(shuffleDep)
    +    assert(failure.getMessage.startsWith(
    +      "Job aborted due to stage failure: Task not serializable"))
    +    sc.listenerBus.waitUntilEmpty(WAIT_TIMEOUT_MILLIS)
    +    assert(sparkListener.failedStages.contains(0))
    +    assert(sparkListener.failedStages.size === 1)
    +    assertDataStructuresEmpty()
    --- End diff --
    
    Can you add to this test so one successful job is submitted afterwards (and 
check in the test that the 2nd job was run successfully)?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to