This is an automated email from the ASF dual-hosted git repository.
opwvhk pushed a commit to branch branch-1.12
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/branch-1.12 by this push:
new 3b6a3d0e90 Fix test (again)
3b6a3d0e90 is described below
commit 3b6a3d0e900236bce78899c11f347bbc61b7e45c
Author: Oscar Westra van Holthe - Kind <[email protected]>
AuthorDate: Mon Jun 16 10:01:19 2025 +0200
Fix test (again)
---
.../apache/avro/TestReadingWritingDataInEvolvedSchemas.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git
a/lang/java/avro/src/test/java/org/apache/avro/TestReadingWritingDataInEvolvedSchemas.java
b/lang/java/avro/src/test/java/org/apache/avro/TestReadingWritingDataInEvolvedSchemas.java
index 5df9416ec5..d6a57587a3 100644
---
a/lang/java/avro/src/test/java/org/apache/avro/TestReadingWritingDataInEvolvedSchemas.java
+++
b/lang/java/avro/src/test/java/org/apache/avro/TestReadingWritingDataInEvolvedSchemas.java
@@ -17,17 +17,14 @@
*/
package org.apache.avro;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.stream.Stream;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericData.EnumSymbol;
@@ -438,9 +435,9 @@ public class TestReadingWritingDataInEvolvedSchemas {
if (blob == null) {
return null;
}
- GenericDatumReader<Record> reader = new GenericDatumReader<>();
- reader.setExpected(expectedSchema);
- reader.setSchema(schemaOfBlob);
+ GenericData model = new GenericData();
+ model.setFastReaderEnabled(true);
+ GenericDatumReader<Record> reader = new
GenericDatumReader<>(expectedSchema, schemaOfBlob, model);
Decoder decoder = encoderType == EncoderType.BINARY ?
DecoderFactory.get().binaryDecoder(blob, null)
: DecoderFactory.get().jsonDecoder(schemaOfBlob, new
ByteArrayInputStream(blob));
return reader.read(null, decoder);