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

Function TestClientCreatePartitionsNoAssignments

createpartitions_test.go:45–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestClientCreatePartitionsNoAssignments(t *testing.T) {
46 if !ktesting.KafkaIsAtLeast("1.0.1") {
47 return
48 }
49
50 client, shutdown := newLocalClient()
51 defer shutdown()
52
53 topic := makeTopic()
54 createTopic(t, topic, 1)
55 defer deleteTopic(t, topic)
56
57 res, err := client.CreatePartitions(context.Background(), &CreatePartitionsRequest{
58 Topics: []TopicPartitionsConfig{
59 {
60 Name: topic,
61 Count: 2,
62 },
63 },
64 ValidateOnly: false,
65 })
66 if err != nil {
67 t.Fatal(err)
68 }
69
70 if err := res.Errors[topic]; err != nil {
71 t.Error(err)
72 }
73}

Callers

nothing calls this directly

Calls 6

createTopicFunction · 0.85
deleteTopicFunction · 0.85
CreatePartitionsMethod · 0.80
newLocalClientFunction · 0.70
makeTopicFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…