Skip to content

Commit 483d68a

Browse files
committed
Fix test issue wrt avro-1.11.4
1 parent 380a44a commit 483d68a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

avro/src/test/java/com/fasterxml/jackson/dataformat/avro/interop/InteropTestBase.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import java.lang.reflect.Type;
66

77
import org.apache.avro.Schema;
8+
9+
import org.junit.Before;
810
import org.junit.runner.RunWith;
911
import org.junit.runners.Parameterized;
1012

@@ -25,6 +27,16 @@ public enum DummyEnum {
2527
NORTH, SOUTH, EAST, WEST
2628
}
2729

30+
// see https://github.com/FasterXML/jackson-dataformats-binary/pull/539 for
31+
// explanation (need to allow-list Jackson test packages for Avro 1.11.4+)
32+
@Before
33+
public void init() {
34+
System.setProperty("org.apache.avro.SERIALIZABLE_PACKAGES",
35+
"java.lang,java.math,java.io,java.net,org.apache.avro.reflect," +
36+
// ^^^ These are default trusted packages by Avro 1.11.4
37+
InteropTestBase.class.getPackage().getName());
38+
}
39+
2840
/**
2941
* Helper method for building a {@link ParameterizedType} for use with <code>roundTrip(Type, Object)</code>
3042
*

0 commit comments

Comments
 (0)