Skip to content

Commit

Permalink
Added system property SERIALIZABLE_PACKAGES for testAvroReflect
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Diedrich committed Oct 24, 2024
1 parent 3e859dd commit dccaddf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@ public void testGetName() {

@Test (timeout = 30000)
public void testAvroReflect() throws Exception {
// Avro expects explicitely stated, trusted packages used for (de-)serialization
System.setProperty("org.apache.avro.SERIALIZABLE_PACKAGES", "org.apache.hadoop.fs.Path");
AvroTestUtil.testReflect
(new Path("foo"),
"{\"type\":\"string\",\"java-class\":\"org.apache.hadoop.fs.Path\"}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ public void testConcurrentEncodeDecode() throws Exception{

@Test
public void testAvroReflect() throws Exception {
// Avro expects explicitely stated, trusted packages used for (de-)serialization
System.setProperty("org.apache.avro.SERIALIZABLE_PACKAGES", "org.apache.hadoop.io.Text");
AvroTestUtil.testReflect
(new Text("foo"),
"{\"type\":\"string\",\"java-class\":\"org.apache.hadoop.io.Text\"}");
Expand Down

0 comments on commit dccaddf

Please sign in to comment.