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

Function TestEmptyTracingDialWithContext

client_server_test.go:905–923  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

903}
904
905func TestEmptyTracingDialWithContext(t *testing.T) {
906
907 trace := &httptrace.ClientTrace{}
908 ctx := httptrace.WithClientTrace(context.Background(), trace)
909
910 s := newTLSServer(t)
911 defer s.Close()
912
913 d := cstDialer
914 d.TLSClientConfig = &tls.Config{RootCAs: rootCAs(t, s.Server)}
915
916 ws, _, err := d.DialContext(ctx, s.URL, nil)
917 if err != nil {
918 t.Fatalf("Dial: %v", err)
919 }
920
921 defer ws.Close()
922 sendRecv(t, ws)
923}
924
925// TestNetDialConnect tests selection of dial method between NetDial, NetDialContext, NetDialTLS or NetDialTLSContext
926func TestNetDialConnect(t *testing.T) {

Callers

nothing calls this directly

Calls 5

newTLSServerFunction · 0.85
rootCAsFunction · 0.85
sendRecvFunction · 0.85
DialContextMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected