Skip to content

Commit 8816573

Browse files
authored
chore: fix typo in the function name (#3435)
1 parent 1f1acd0 commit 8816573

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎graphql/handler/transport/websocket_test.go‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func TestWebsocketGraphqltransportwsSubprotocol(t *testing.T) {
611611
_, srv := initialize(transport.Websocket{})
612612
defer srv.Close()
613613

614-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
614+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
615615
defer c.Close()
616616

617617
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -622,7 +622,7 @@ func TestWebsocketGraphqltransportwsSubprotocol(t *testing.T) {
622622
handler, srv := initialize(transport.Websocket{})
623623
defer srv.Close()
624624

625-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
625+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
626626
defer c.Close()
627627

628628
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -657,7 +657,7 @@ func TestWebsocketGraphqltransportwsSubprotocol(t *testing.T) {
657657
_, srv := initialize(transport.Websocket{KeepAlivePingInterval: 5 * time.Millisecond})
658658
defer srv.Close()
659659

660-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
660+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
661661
defer c.Close()
662662

663663
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -683,7 +683,7 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
683683
_, srv := initialize(transport.Websocket{PingPongInterval: 20 * time.Millisecond})
684684
defer srv.Close()
685685

686-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
686+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
687687
defer c.Close()
688688

689689
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -703,7 +703,7 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
703703
_, srv := initialize(transport.Websocket{PingPongInterval: 10 * time.Millisecond})
704704
defer srv.Close()
705705

706-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
706+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
707707
defer c.Close()
708708

709709
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -727,7 +727,7 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
727727
srv := httptest.NewServer(h)
728728
defer srv.Close()
729729

730-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
730+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
731731
defer c.Close()
732732

733733
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -758,7 +758,7 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
758758
srv := httptest.NewServer(h)
759759
defer srv.Close()
760760

761-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
761+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
762762
defer c.Close()
763763

764764
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -804,7 +804,7 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
804804
h, srv := initialize(transport.Websocket{PongOnlyInterval: 10 * time.Millisecond})
805805
defer srv.Close()
806806

807-
c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
807+
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
808808
defer c.Close()
809809

810810
require.NoError(t, c.WriteJSON(&operationMessage{Type: graphqltransportwsConnectionInitMsg}))
@@ -836,13 +836,13 @@ func TestWebsocketWithPingPongInterval(t *testing.T) {
836836
}
837837

838838
func wsConnect(url string) *websocket.Conn {
839-
return wsConnectWithSubprocotol(url, "")
839+
return wsConnectWithSubprotocol(url, "")
840840
}
841841

842-
func wsConnectWithSubprocotol(url, subprocotol string) *websocket.Conn {
842+
func wsConnectWithSubprotocol(url, subprotocol string) *websocket.Conn {
843843
h := make(http.Header)
844-
if subprocotol != "" {
845-
h.Add("Sec-WebSocket-Protocol", subprocotol)
844+
if subprotocol != "" {
845+
h.Add("Sec-WebSocket-Protocol", subprotocol)
846846
}
847847

848848
c, resp, err := websocket.DefaultDialer.Dial(strings.ReplaceAll(url, "http://", "ws://"), h)

0 commit comments

Comments
 (0)