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

Function TestClientProduceNilRecords

produce_test.go:105–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

103}
104
105func TestClientProduceNilRecords(t *testing.T) {
106 client, topic, shutdown := newLocalClientAndTopic()
107 defer shutdown()
108
109 _, err := client.Produce(context.Background(), &ProduceRequest{
110 Topic: topic,
111 Partition: 0,
112 RequiredAcks: -1,
113 Records: nil,
114 })
115
116 if err != nil {
117 t.Fatal(err)
118 }
119}
120
121func TestClientProduceEmptyRecords(t *testing.T) {
122 client, topic, shutdown := newLocalClientAndTopic()

Callers

nothing calls this directly

Calls 2

ProduceMethod · 0.80
newLocalClientAndTopicFunction · 0.70

Tested by

no test coverage detected