aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-04-24 14:46:22 +0200
committerLoïc Hoguin <[email protected]>2014-04-24 14:55:58 +0200
commita3f7f68e30e97e907b230d14fe5d449c4fc8095c (patch)
treefe9be16b55a66bfc9e675576b4c19b5331d01884 /test/http_SUITE.erl
parent25a17a259056f8343f042553f9a0394309c9d928 (diff)
downloadcowboy-a3f7f68e30e97e907b230d14fe5d449c4fc8095c.tar.gz
cowboy-a3f7f68e30e97e907b230d14fe5d449c4fc8095c.tar.bz2
cowboy-a3f7f68e30e97e907b230d14fe5d449c4fc8095c.zip
Fix two issues where listeners didn't get stopped properly
Diffstat (limited to 'test/http_SUITE.erl')
-rw-r--r--test/http_SUITE.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index 578b391..1c89b1a 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -131,12 +131,12 @@ init_per_group(parse_host, Config) ->
{"/req_attr", http_req_attr, []}
]}
]),
- {ok, _} = cowboy:start_http(http, 100, [{port, 0}], [
+ {ok, _} = cowboy:start_http(parse_host, 100, [{port, 0}], [
{env, [{dispatch, Dispatch}]},
{max_keepalive, 50},
{timeout, 500}
]),
- Port = ranch:get_port(http),
+ Port = ranch:get_port(parse_host),
[{type, tcp}, {port, Port}, {opts, []}|Config];
init_per_group(set_env, Config) ->
{ok, _} = cowboy:start_http(set_env, 100, [{port, 0}], [
@@ -148,7 +148,7 @@ init_per_group(set_env, Config) ->
[{type, tcp}, {port, Port}, {opts, []}|Config].
end_per_group(Name, _) ->
- cowboy:stop_listener(Name).
+ ok = cowboy:stop_listener(Name).
%% Dispatch configuration.
@@ -416,8 +416,8 @@ http10_chunkless(Config) ->
gun_is_gone(ConnPid, MRef).
http10_hostless(Config) ->
+ Name = http10_hostless,
Port10 = config(port, Config) + 10,
- Name = list_to_atom("http10_hostless_" ++ integer_to_list(Port10)),
Transport = case config(type, Config) of
tcp -> ranch_tcp;
ssl -> ranch_ssl
@@ -432,7 +432,7 @@ http10_hostless(Config) ->
),
200 = do_raw("GET /http1.0/hostless HTTP/1.0\r\n\r\n",
[{port, Port10}|Config]),
- cowboy:stop_listener(http10).
+ cowboy:stop_listener(http10_hostless).
keepalive_max(Config) ->
{ConnPid, MRef} = gun_monitor_open(Config),