File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
core/src/test/scala/org/apache/spark/serializer Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,9 @@ class KryoSerializerSuite extends SparkFunSuite with SharedSparkContext {
109109 }
110110
111111 test(" pairs" ) {
112+ val conf = new SparkConf (false )
113+ conf.set(" spark.kryo.registrationRequired" , " true" )
114+
112115 val ser = new KryoSerializer (conf).newInstance()
113116 def check [T : ClassTag ](t : T ) {
114117 assert(ser.deserialize[T ](ser.serialize(t)) === t)
@@ -133,12 +136,16 @@ class KryoSerializerSuite extends SparkFunSuite with SharedSparkContext {
133136 }
134137
135138 test(" Scala data structures" ) {
139+ val conf = new SparkConf (false )
140+ conf.set(" spark.kryo.registrationRequired" , " true" )
141+
136142 val ser = new KryoSerializer (conf).newInstance()
137143 def check [T : ClassTag ](t : T ) {
138144 assert(ser.deserialize[T ](ser.serialize(t)) === t)
139145 }
140146 check(List [Int ]())
141147 check(List [Int ](1 , 2 , 3 ))
148+ check(Seq [Int ](1 , 2 , 3 ))
142149 check(List [String ]())
143150 check(List [String ](" x" , " y" , " z" ))
144151 check(None )
You can’t perform that action at this time.
0 commit comments