use of org.apache.kafka.raft.internals.RecordsIteratorTest.TestBatch in project kafka by apache.
the class RecordsBatchReaderTest method testReadFromMemoryRecords.
@ParameterizedTest
@EnumSource(CompressionType.class)
public void testReadFromMemoryRecords(CompressionType compressionType) {
long baseOffset = 57;
List<TestBatch<String>> batches = RecordsIteratorTest.createBatches(baseOffset);
MemoryRecords memRecords = RecordsIteratorTest.buildRecords(compressionType, batches);
testBatchReader(baseOffset, memRecords, batches);
}
use of org.apache.kafka.raft.internals.RecordsIteratorTest.TestBatch in project kafka by apache.
the class RecordsBatchReaderTest method testReadFromFileRecords.
@ParameterizedTest
@EnumSource(CompressionType.class)
public void testReadFromFileRecords(CompressionType compressionType) throws Exception {
long baseOffset = 57;
List<TestBatch<String>> batches = RecordsIteratorTest.createBatches(baseOffset);
MemoryRecords memRecords = RecordsIteratorTest.buildRecords(compressionType, batches);
FileRecords fileRecords = FileRecords.open(tempFile());
fileRecords.append(memRecords);
testBatchReader(baseOffset, fileRecords, batches);
}
Aggregations