Skip to content

Commit 1324f2a

Browse files
committed
Fix some Avro fails
1 parent 183fb4f commit 1324f2a

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

avro/src/test/java/tools/jackson/dataformat/avro/ArrayTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616

1717
public class ArrayTest extends AvroTestBase
1818
{
19-
private final AvroMapper MAPPER = getMapper();
19+
// 30-Jan-2025, tatu: With 3.0 and `DeserializationFeature.FAIL_ON_TRAILING_TOKENS`
20+
// default, need to turn it off for this test.
21+
private final AvroMapper MAPPER = mapperBuilder()
22+
.disable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS)
23+
.build();
2024

2125
// Simple test for a single array
2226
@Test

avro/src/test/java/tools/jackson/dataformat/avro/AvroTestBase.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ protected static AvroMapper newMapper() {
305305
return new AvroMapper();
306306
}
307307

308+
protected static AvroMapper.Builder mapperBuilder() {
309+
return AvroMapper.builder();
310+
}
311+
308312
protected static AvroMapper newApacheMapper() {
309313
return new AvroMapper(AvroFactory.builderWithApacheDecoder().build());
310314
}

avro/src/test/java/tools/jackson/dataformat/avro/RootEmptyRecord177Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class RootEmptyRecord177Test extends AvroTestBase
1414
"{'type':'record', 'name':'Empty','namespace':'something','fields':[]}");
1515

1616
@JsonAutoDetect // just a marker to avoid "no properties found" exception
17-
static final class Empty {
17+
public static final class Empty {
1818
@Override
1919
public boolean equals(Object o) {
2020
return o instanceof Empty;

0 commit comments

Comments
 (0)