diff options
author | Loïc Hoguin <[email protected]> | 2018-06-26 10:32:33 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-06-26 10:32:33 +0200 |
commit | 7867e435fe6262d783f797c659e215dc14096449 (patch) | |
tree | 9494bebd293c889782be83147ce9f6daa2200974 /test/examples_SUITE.erl | |
parent | b2b5e3a01a1e02b79bcba330d11db693cd654c8f (diff) | |
download | cowboy-7867e435fe6262d783f797c659e215dc14096449.tar.gz cowboy-7867e435fe6262d783f797c659e215dc14096449.tar.bz2 cowboy-7867e435fe6262d783f797c659e215dc14096449.zip |
Fix tests for most recent Gun
Diffstat (limited to 'test/examples_SUITE.erl')
-rw-r--r-- | test/examples_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/examples_SUITE.erl b/test/examples_SUITE.erl index ec3ebb1..c60315b 100644 --- a/test/examples_SUITE.erl +++ b/test/examples_SUITE.erl @@ -436,23 +436,23 @@ websocket(Config) -> {ok, Pid} = gun:open("127.0.0.1", 8080, #{protocols => [http], retry => 0}), {ok, http} = gun:await_up(Pid), _ = monitor(process, Pid), - gun:ws_upgrade(Pid, "/websocket", [], #{compress => true}), + StreamRef = gun:ws_upgrade(Pid, "/websocket", [], #{compress => true}), receive - {gun_ws_upgrade, Pid, ok, _} -> + {gun_upgrade, Pid, StreamRef, _, _} -> ok; Msg1 -> exit({connection_failed, Msg1}) end, %% Check that we receive the message sent on timer on init. receive - {gun_ws, Pid, {text, <<"Hello!">>}} -> + {gun_ws, Pid, StreamRef, {text, <<"Hello!">>}} -> ok after 2000 -> exit(timeout) end, %% Check that we receive subsequent messages sent on timer. receive - {gun_ws, Pid, {text, <<"How' you doin'?">>}} -> + {gun_ws, Pid, StreamRef, {text, <<"How' you doin'?">>}} -> ok after 2000 -> exit(timeout) @@ -460,7 +460,7 @@ websocket(Config) -> %% Check that we receive the echoed message. gun:ws_send(Pid, {text, <<"hello">>}), receive - {gun_ws, Pid, {text, <<"That's what she said! hello">>}} -> + {gun_ws, Pid, StreamRef, {text, <<"That's what she said! hello">>}} -> ok after 500 -> exit(timeout) |