MCPcopy
hub / github.com/gorilla/websocket / TestFailedConnectionReadPanic

Function TestFailedConnectionReadPanic

conn_test.go:693–706  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

691}
692
693func TestFailedConnectionReadPanic(t *testing.T) {
694 c := newTestConn(failingReader{}, nil, false)
695
696 defer func() {
697 if v := recover(); v != nil {
698 return
699 }
700 }()
701
702 for i := 0; i < 20000; i++ {
703 c.ReadMessage()
704 }
705 t.Fatal("should not get here")
706}

Callers

nothing calls this directly

Calls 2

newTestConnFunction · 0.85
ReadMessageMethod · 0.80

Tested by

no test coverage detected