(t *testing.T)
| 1154 | } |
| 1155 | |
| 1156 | func TestUnsupportedSASLMechanism(t *testing.T) { |
| 1157 | ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| 1158 | defer cancel() |
| 1159 | |
| 1160 | conn, err := (&Dialer{ |
| 1161 | Resolver: &net.Resolver{}, |
| 1162 | }).DialContext(ctx, "tcp", "127.0.0.1:9093") |
| 1163 | if err != nil { |
| 1164 | t.Fatal("failed to open a new kafka connection:", err) |
| 1165 | } |
| 1166 | defer conn.Close() |
| 1167 | |
| 1168 | if err := conn.saslHandshake("FOO"); !errors.Is(err, UnsupportedSASLMechanism) { |
| 1169 | t.Errorf("Expected UnsupportedSASLMechanism but got %v", err) |
| 1170 | } |
| 1171 | } |
| 1172 | |
| 1173 | const benchmarkMessageCount = 100 |
| 1174 |
nothing calls this directly
no test coverage detected