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

Function testConnCloseAndWrite

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

Source from the content-addressed store, hash-verified

388}
389
390func testConnCloseAndWrite(t *testing.T, conn *Conn) {
391 conn.Close()
392
393 _, err := conn.Write([]byte("Hello World!"))
394
395 // expect a network error
396 var netOpError *net.OpError
397 if !errors.As(err, &netOpError) {
398 t.Error(err)
399 }
400}
401
402func testConnSeekFirstOffset(t *testing.T, conn *Conn) {
403 for i := 0; i != 10; i++ {

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.45
WriteMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected