(t *testing.T)
| 328 | } |
| 329 | |
| 330 | func testWriterMaxAttemptsErr(t *testing.T) { |
| 331 | topic := makeTopic() |
| 332 | createTopic(t, topic, 1) |
| 333 | defer deleteTopic(t, topic) |
| 334 | |
| 335 | w := newTestWriter(WriterConfig{ |
| 336 | Brokers: []string{"localhost:9999"}, // nothing is listening here |
| 337 | Topic: topic, |
| 338 | MaxAttempts: 3, |
| 339 | Balancer: &RoundRobin{}, |
| 340 | }) |
| 341 | defer w.Close() |
| 342 | |
| 343 | if err := w.WriteMessages(context.Background(), Message{ |
| 344 | Value: []byte("Hello World!"), |
| 345 | }); err == nil { |
| 346 | t.Error("expected error") |
| 347 | return |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | func testWriterMaxBytes(t *testing.T) { |
| 352 | topic := makeTopic() |
nothing calls this directly
no test coverage detected