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

Function testConnWrite

conn_test.go:378–388  ·  view source on GitHub ↗
(t *testing.T, conn *Conn)

Source from the content-addressed store, hash-verified

376}
377
378func testConnWrite(t *testing.T, conn *Conn) {
379 b := []byte("Hello World!")
380 n, err := conn.Write(b)
381 if err != nil {
382 t.Error(err)
383 }
384
385 if n != len(b) {
386 t.Error("bad length returned by (*Conn).Write:", n)
387 }
388}
389
390func testConnCloseAndWrite(t *testing.T, conn *Conn) {
391 conn.Close()

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected