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

Function TestReadPartitionsNoTopic

conn_test.go:1139–1154  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1137}
1138
1139func TestReadPartitionsNoTopic(t *testing.T) {
1140 conn, err := Dial("tcp", "127.0.0.1:9092")
1141 if err != nil {
1142 t.Fatal(err)
1143 }
1144 defer conn.Close()
1145
1146 parts, err := conn.ReadPartitions()
1147 if err != nil {
1148 t.Error(err)
1149 }
1150
1151 if len(parts) == 0 {
1152 t.Errorf("no partitions were returned")
1153 }
1154}
1155
1156func TestUnsupportedSASLMechanism(t *testing.T) {
1157 ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)

Callers

nothing calls this directly

Calls 4

DialFunction · 0.85
CloseMethod · 0.45
ReadPartitionsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected