Skip to content

Commit

Permalink
chore: fix typo in the function name (#3435)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Dec 13, 2024
1 parent 1f1acd0 commit 8816573
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions graphql/handler/transport/websocket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ func TestWebsocketGraphqltransportwsSubprotocol(t *testing.T) {
_, srv := initialize(transport.Websocket{})
defer srv.Close()

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

c := wsConnectWithSubprocotol(srv.URL, graphqltransportwsSubprotocol)
c := wsConnectWithSubprotocol(srv.URL, graphqltransportwsSubprotocol)
defer c.Close()

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

func wsConnect(url string) *websocket.Conn {
return wsConnectWithSubprocotol(url, "")
return wsConnectWithSubprotocol(url, "")
}

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

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

0 comments on commit 8816573

Please sign in to comment.