Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/10368#discussion_r48079521
--- Diff:
core/src/test/scala/org/apache/spark/scheduler/TaskResultGetterSuite.scala ---
@@ -81,6 +81,16 @@ class TaskResultGetterSuite extends SparkFunSuite with
BeforeAndAfter with Local
// as we can make it) so the tests don't take too long.
def conf: SparkConf = new SparkConf().set("spark.akka.frameSize", "1")
+ test("Kryo serializer for TaskResult") {
+ val conf1 = new SparkConf(false)
+ conf1.set("spark.serializer",
"org.apache.spark.serializer.KryoSerializer")
+ conf1.set("spark.kryoserializer.buffer", "1m")
+ conf1.set("spark.kryoserializer.buffer.max", "2m")
+ sc = new SparkContext("local", "test", conf1)
+ val result = sc.parallelize(Seq(1), 1).map(x => 2 * x).reduce((x, y)
=> x)
+ assert(result === 2)
--- End diff --
All I'm suggesting is a test that looks like the one added here:
https://github.com/apache/spark/commit/de0278286cf6db8df53b0b68918ea114f2c77f1f
In general tests should be as fine-grained as possible. Right now this just
does an end-to-end test, which may be sufficient but is quite brittle. E.g.
imagine if we change the name of the config or the serializer, then this won't
actually test what we want.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]