aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-04-10 17:34:26 +0300
committerLoïc Hoguin <[email protected]>2015-04-10 17:34:26 +0300
commitf618634bf648124c9562aaf49ee460be9ef71ae7 (patch)
treea0bd678d5e053358d3662ee626db677ab6033b2e /test
parentcff0a87d3cbdcf67a9049cdc2784d459711e2867 (diff)
downloadgun-f618634bf648124c9562aaf49ee460be9ef71ae7.tar.gz
gun-f618634bf648124c9562aaf49ee460be9ef71ae7.tar.bz2
gun-f618634bf648124c9562aaf49ee460be9ef71ae7.zip
Add headers to gun_ws_upgrade message
Also improves the code and documentation about this message. It was incorrectly specified that a gun_ws_upgrade message could be sent on error; instead a gun_response is sent.
Diffstat (limited to 'test')
-rw-r--r--test/ws_SUITE.erl9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/ws_SUITE.erl b/test/ws_SUITE.erl
index 2df4329..ce2c303 100644
--- a/test/ws_SUITE.erl
+++ b/test/ws_SUITE.erl
@@ -143,16 +143,11 @@ log_output() ->
connect(Path) ->
{ok, Pid} = gun:open("127.0.0.1", 33080, #{retry=>0}),
- receive
- {gun_up, Pid, http} ->
- ok
- after 1000 ->
- error(open_timeout)
- end,
+ {ok, http} = gun:await_up(Pid),
Ref = monitor(process, Pid),
gun:ws_upgrade(Pid, Path, [], #{compress => true}),
receive
- {gun_ws_upgrade, Pid, ok} ->
+ {gun_ws_upgrade, Pid, ok, _} ->
ok;
Msg ->
ct:print("Unexpected message ~p", [Msg]),