From f618634bf648124c9562aaf49ee460be9ef71ae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 10 Apr 2015 17:34:26 +0300 Subject: 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. --- test/ws_SUITE.erl | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'test/ws_SUITE.erl') 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]), -- cgit v1.2.3