Skip to content
Snippets Groups Projects
Commit 761ea65a authored by Reynold Xin's avatar Reynold Xin
Browse files

Added a test for the previous commit (failing to serialize task results

would throw an exception for local tasks).
parent 9821cd4d
No related branches found
No related tags found
No related merge requests found
......@@ -65,5 +65,21 @@ class FailureSuite extends FunSuite {
FailureSuiteState.clear()
}
test("failure because task results are not serializable") {
val sc = new SparkContext("local[1,1]", "test")
val results = sc.makeRDD(1 to 3).map(x => new NonSerializable)
val thrown = intercept[spark.SparkException] {
results.collect()
}
assert(thrown.getClass === classOf[spark.SparkException])
assert(thrown.getMessage.contains("NotSerializableException"))
sc.stop()
FailureSuiteState.clear()
}
// TODO: Need to add tests with shuffle fetch failures.
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment