File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,17 @@ import (
99 kafkaapi "github.com/codecrafters-io/kafka-tester/protocol/api"
1010 "github.com/codecrafters-io/kafka-tester/protocol/common"
1111 "github.com/codecrafters-io/kafka-tester/protocol/decoder"
12+ "github.com/codecrafters-io/kafka-tester/protocol/serializer"
1213 "github.com/codecrafters-io/tester-utils/logger"
1314)
1415
1516type TopicPartitionLogAssertion struct {
1617 topic string
1718 partition int32
18- RecordBatches [] kafkaapi.RecordBatch
19+ RecordBatches kafkaapi.RecordBatches
1920}
2021
21- func NewTopicPartitionLogAssertion (topic string , partition int32 , recordBatches [] kafkaapi.RecordBatch ) TopicPartitionLogAssertion {
22+ func NewTopicPartitionLogAssertion (topic string , partition int32 , recordBatches kafkaapi.RecordBatches ) TopicPartitionLogAssertion {
2223 return TopicPartitionLogAssertion {
2324 topic : topic ,
2425 partition : partition ,
@@ -35,7 +36,7 @@ func (a TopicPartitionLogAssertion) Run(logger *logger.Logger) error {
3536 return fmt .Errorf ("Failed to read log file %s: %w" , logFilePath , err )
3637 }
3738
38- expectedEncodedRecordBatches := encodeRecordBatches (a .RecordBatches )
39+ expectedEncodedRecordBatches := serializer . GetEncodedBytes (a .RecordBatches )
3940 if len (expectedEncodedRecordBatches ) == 0 {
4041 panic ("Codecrafters Internal Error: RecordBatches are empty" )
4142 }
You can’t perform that action at this time.
0 commit comments