|
@@ -21,6 +21,7 @@ package org.apache.hadoop.io.serializer.avro;
|
|
import junit.framework.TestCase;
|
|
import junit.framework.TestCase;
|
|
|
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
|
+import org.apache.hadoop.io.serializer.SerializationFactory;
|
|
import org.apache.hadoop.io.serializer.SerializationTestUtil;
|
|
import org.apache.hadoop.io.serializer.SerializationTestUtil;
|
|
|
|
|
|
public class TestAvroSerialization extends TestCase {
|
|
public class TestAvroSerialization extends TestCase {
|
|
@@ -43,6 +44,12 @@ public class TestAvroSerialization extends TestCase {
|
|
assertEquals(before, after);
|
|
assertEquals(before, after);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void testAcceptHandlingPrimitivesAndArrays() throws Exception {
|
|
|
|
+ SerializationFactory factory = new SerializationFactory(conf);
|
|
|
|
+ assertNull(factory.getSerializer(byte[].class));
|
|
|
|
+ assertNull(factory.getSerializer(byte.class));
|
|
|
|
+ }
|
|
|
|
+
|
|
public void testReflectInnerClass() throws Exception {
|
|
public void testReflectInnerClass() throws Exception {
|
|
InnerRecord before = new InnerRecord();
|
|
InnerRecord before = new InnerRecord();
|
|
before.x = 10;
|
|
before.x = 10;
|