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

Function TestDialTimeout

client_server_test.go:317–328  ·  client_server_test.go::TestDialTimeout
(t *testing.T)

Source from the content-addressed store, hash-verified

315}
316
317func TestDialTimeout(t *testing.T) {
318 s := newServer(t)
319 defer s.Close()
320
321 d := cstDialer
322 d.HandshakeTimeout = -1
323 ws, _, err := d.Dial(s.URL, nil)
324 if err == nil {
325 ws.Close()
326 t.Fatalf("Dial: nil")
327 }
328}
329
330// requireDeadlineNetConn fails the current test when Read or Write are called
331// with no deadline.

Callers

nothing calls this directly

Calls 3

newServerFunction · 0.85
DialMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected