opwvhk commented on code in PR #2967:
URL: https://github.com/apache/avro/pull/2967#discussion_r1651131137


##########
lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java:
##########
@@ -221,6 +228,37 @@ private void testSyncDiscovery(CodecFactory codec) throws 
IOException {
         reader.seek(sync);
         assertNotNull(reader.next());
       }
+      // Lastly, confirm that reading (but not decoding) all blocks results in 
the
+      // same sync points
+      reader.sync(0);
+      ArrayList<Long> syncs2 = new ArrayList<>();
+      while (reader.hasNext()) {
+        syncs2.add(reader.previousSync());
+        reader.nextBlock();
+      }
+      assertEquals(syncs, syncs2);

Review Comment:
   This bit tests that reading/skipping blocks yields the same sync points as 
reading/decoding single records.



-- 
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]

Reply via email to