Skip to content

Commit 59eba80

Browse files
committed
Minor test clean up
1 parent 653f792 commit 59eba80

File tree

1 file changed

+9
-4
lines changed
  • avro/src/test/java/com/fasterxml/jackson/dataformat/avro/interop/annotations

1 file changed

+9
-4
lines changed

avro/src/test/java/com/fasterxml/jackson/dataformat/avro/interop/annotations/AvroNameTest.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.apache.avro.reflect.AvroName;
66
import org.junit.Test;
77

8+
import com.fasterxml.jackson.databind.exc.InvalidDefinitionException;
89
import com.fasterxml.jackson.dataformat.avro.AvroTestBase;
910
import com.fasterxml.jackson.dataformat.avro.interop.InteropTestBase;
1011

@@ -34,19 +35,23 @@ public static class RecordWithNameCollision {
3435
}
3536

3637
@Test
37-
public void testRecordWithRenamedField() throws IOException{
38+
public void testRecordWithRenamedField() throws Exception{
3839
RecordWithRenamed original = new RecordWithRenamed();
3940
original.someField = "blah";
4041
RecordWithRenamed result = roundTrip(original);
4142
assertThat(result).isEqualTo(original);
4243
}
4344

44-
public void testRecordWithNameCollision() throws IOException {
45+
// 02-Nov-2023, tatu: This test has been disabled for some reason, but
46+
// without commentary. Fixed it a bit but ultimately can't enable yet
47+
48+
// @Test
49+
public void testRecordWithNameCollision() throws Exception {
4550
try {
4651
schemaFunctor.apply(RecordWithNameCollision.class);
4752
fail("Should not pass");
48-
} catch (IllegalArgumentException e) {
49-
AvroTestBase.verifyException(e, "foobar");
53+
} catch (InvalidDefinitionException e) {
54+
AvroTestBase.verifyException(e, "double field entry: otherField");
5055
}
5156
}
5257
}

0 commit comments

Comments
 (0)