RyanSkraba commented on code in PR #3924:
URL: https://github.com/apache/avro/pull/3924#discussion_r3729195484
##########
lang/java/avro/src/test/java/org/apache/avro/specific/TestSpecificDatumReader.java:
##########
@@ -68,6 +68,12 @@ public String getContent() {
public static class MyReader extends SpecificDatumReader<MyData> {
+ MyReader() {
+ // Use a new data model instead of the singleton in order to avoid
modifying the
+ // setFastReaderEnabled state for other tests.
+ super(null, null, new SpecificData());
Review Comment:
OK, it looks like this was a hidden bug -- if we
`setFastReaderEnabled(true)` or `setFastReaderEnabled(false)` on the singleton
instance of SpecificData, it overrides the system property and _**in other
tests**_ we end up not testing what we thought we were testing...
I checked through the code and this looks like the only spot where it gets
changed in the singleton.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]