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

Function testWriterSetsRightBalancer

writer_test.go:254–266  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

252}
253
254func testWriterSetsRightBalancer(t *testing.T) {
255 const topic = "test-writer-1"
256 balancer := &CRC32Balancer{}
257 w := newTestWriter(WriterConfig{
258 Topic: topic,
259 Balancer: balancer,
260 })
261 defer w.Close()
262
263 if w.Balancer != balancer {
264 t.Errorf("Balancer not set correctly")
265 }
266}
267
268func testWriterRoundRobin1(t *testing.T) {
269 const topic = "test-writer-1"

Callers

nothing calls this directly

Calls 2

newTestWriterFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected