0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Use gun:ws_send/3 in tests

This commit is contained in:
Loïc Hoguin 2020-11-23 10:46:18 +01:00
parent e12d7bbe21
commit fa9c8ad832
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
2 changed files with 15 additions and 15 deletions

View file

@ -458,14 +458,14 @@ websocket(Config) ->
exit(timeout)
end,
%% Check that we receive the echoed message.
gun:ws_send(Pid, {text, <<"hello">>}),
gun:ws_send(Pid, StreamRef, {text, <<"hello">>}),
receive
{gun_ws, Pid, StreamRef, {text, <<"That's what she said! hello">>}} ->
ok
after 500 ->
exit(timeout)
end,
gun:ws_send(Pid, close)
gun:ws_send(Pid, StreamRef, close)
after
do_stop(websocket)
end.