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 (
9
9
kafkaapi "github.com/codecrafters-io/kafka-tester/protocol/api"
10
10
"github.com/codecrafters-io/kafka-tester/protocol/common"
11
11
"github.com/codecrafters-io/kafka-tester/protocol/decoder"
12
+ "github.com/codecrafters-io/kafka-tester/protocol/serializer"
12
13
"github.com/codecrafters-io/tester-utils/logger"
13
14
)
14
15
15
16
type TopicPartitionLogAssertion struct {
16
17
topic string
17
18
partition int32
18
- RecordBatches [] kafkaapi.RecordBatch
19
+ RecordBatches kafkaapi.RecordBatches
19
20
}
20
21
21
- func NewTopicPartitionLogAssertion (topic string , partition int32 , recordBatches [] kafkaapi.RecordBatch ) TopicPartitionLogAssertion {
22
+ func NewTopicPartitionLogAssertion (topic string , partition int32 , recordBatches kafkaapi.RecordBatches ) TopicPartitionLogAssertion {
22
23
return TopicPartitionLogAssertion {
23
24
topic : topic ,
24
25
partition : partition ,
@@ -35,7 +36,7 @@ func (a TopicPartitionLogAssertion) Run(logger *logger.Logger) error {
35
36
return fmt .Errorf ("Failed to read log file %s: %w" , logFilePath , err )
36
37
}
37
38
38
- expectedEncodedRecordBatches := encodeRecordBatches (a .RecordBatches )
39
+ expectedEncodedRecordBatches := serializer . GetEncodedBytes (a .RecordBatches )
39
40
if len (expectedEncodedRecordBatches ) == 0 {
40
41
panic ("Codecrafters Internal Error: RecordBatches are empty" )
41
42
}
You can’t perform that action at this time.
0 commit comments