MCPcopy
hub / github.com/segmentio/kafka-go / TestClientRawProduceEmptyRecords

Function TestClientRawProduceEmptyRecords

rawproduce_test.go:99–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestClientRawProduceEmptyRecords(t *testing.T) {
100 client, topic, shutdown := newLocalClientAndTopic()
101 defer shutdown()
102
103 _, err := client.Produce(context.Background(), &ProduceRequest{
104 Topic: topic,
105 Partition: 0,
106 RequiredAcks: -1,
107 Records: NewRecordReader(),
108 })
109
110 if err != nil {
111 t.Fatal(err)
112 }
113}
114
115func NewRawRecordSet(reader protocol.RecordReader, attr protocol.Attributes) protocol.RawRecordSet {
116 rs := protocol.RecordSet{Version: 2, Attributes: attr, Records: reader}

Callers

nothing calls this directly

Calls 3

ProduceMethod · 0.80
newLocalClientAndTopicFunction · 0.70
NewRecordReaderFunction · 0.70

Tested by

no test coverage detected