aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/handlers/input_crash_h.erl2
-rw-r--r--test/handlers/long_polling_h.erl4
-rw-r--r--test/handlers/loop_handler_body_h.erl4
-rw-r--r--test/handlers/loop_handler_timeout_h.erl2
-rw-r--r--test/http_SUITE.erl6
-rw-r--r--test/http_SUITE_data/http_loop_stream_recv.erl4
-rw-r--r--test/http_SUITE_data/rest_patch_resource.erl4
-rw-r--r--test/http_SUITE_data/rest_resource_etags.erl4
8 files changed, 15 insertions, 15 deletions
diff --git a/test/handlers/input_crash_h.erl b/test/handlers/input_crash_h.erl
index e941cca..c67bb0c 100644
--- a/test/handlers/input_crash_h.erl
+++ b/test/handlers/input_crash_h.erl
@@ -6,5 +6,5 @@
-export([init/2]).
init(Req, content_length) ->
- cowboy_error_h:ignore(cow_http_hd, number, 2),
+ cowboy_error_h:ignore(erlang, binary_to_integer, 1),
cowboy_req:parse_header(<<"content-length">>, Req).
diff --git a/test/handlers/long_polling_h.erl b/test/handlers/long_polling_h.erl
index 20fe7ee..4f8e23f 100644
--- a/test/handlers/long_polling_h.erl
+++ b/test/handlers/long_polling_h.erl
@@ -14,12 +14,12 @@ init(Req, _) ->
{cowboy_loop, Req, 2, 5000, hibernate}.
info(timeout, Req, 0) ->
- {shutdown, cowboy_req:reply(102, Req), 0};
+ {stop, cowboy_req:reply(102, Req), 0};
info(timeout, Req, Count) ->
erlang:send_after(200, self(), timeout),
{ok, Req, Count - 1, hibernate}.
-terminate(shutdown, _, 0) ->
+terminate(stop, _, 0) ->
ok;
terminate({error, overflow}, _, _) ->
ok.
diff --git a/test/handlers/loop_handler_body_h.erl b/test/handlers/loop_handler_body_h.erl
index 096fb3d..0d4fd4d 100644
--- a/test/handlers/loop_handler_body_h.erl
+++ b/test/handlers/loop_handler_body_h.erl
@@ -16,7 +16,7 @@ init(Req, _) ->
info(timeout, Req, State) ->
{ok, Body, Req2} = cowboy_req:body(Req),
100000 = byte_size(Body),
- {shutdown, cowboy_req:reply(200, Req2), State}.
+ {stop, cowboy_req:reply(200, Req2), State}.
-terminate(shutdown, _, _) ->
+terminate(stop, _, _) ->
ok.
diff --git a/test/handlers/loop_handler_timeout_h.erl b/test/handlers/loop_handler_timeout_h.erl
index a1bfa51..6502a3a 100644
--- a/test/handlers/loop_handler_timeout_h.erl
+++ b/test/handlers/loop_handler_timeout_h.erl
@@ -15,7 +15,7 @@ init(Req, _) ->
{cowboy_loop, Req, undefined, 200, hibernate}.
info(timeout, Req, State) ->
- {shutdown, cowboy_req:reply(500, Req), State}.
+ {stop, cowboy_req:reply(500, Req), State}.
terminate(timeout, _, _) ->
ok.
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index bd0f247..12b974c 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -706,7 +706,7 @@ rest_patch(Config) ->
Tests = [
{204, [{<<"content-type">>, <<"text/plain">>}], <<"whatever">>},
{400, [{<<"content-type">>, <<"text/plain">>}], <<"false">>},
- {400, [{<<"content-type">>, <<"text/plain">>}], <<"halt">>},
+ {400, [{<<"content-type">>, <<"text/plain">>}], <<"stop">>},
{415, [{<<"content-type">>, <<"application/json">>}], <<"bad_content_type">>}
],
ConnPid = gun_open(Config),
@@ -748,8 +748,8 @@ rest_resource_etags(Config) ->
{200, <<"\"etag-header-value\"">>, "tuple-strong"},
{200, <<"W/\"etag-header-value\"">>, "binary-weak-quoted"},
{200, <<"\"etag-header-value\"">>, "binary-strong-quoted"},
- {500, false, "binary-strong-unquoted"},
- {500, false, "binary-weak-unquoted"}
+ {400, false, "binary-strong-unquoted"},
+ {400, false, "binary-weak-unquoted"}
],
_ = [{Status, ETag, Type} = begin
{Ret, RespETag} = rest_resource_get_etag(Config, Type),
diff --git a/test/http_SUITE_data/http_loop_stream_recv.erl b/test/http_SUITE_data/http_loop_stream_recv.erl
index 4cd39a2..c006b6d 100644
--- a/test/http_SUITE_data/http_loop_stream_recv.erl
+++ b/test/http_SUITE_data/http_loop_stream_recv.erl
@@ -17,7 +17,7 @@ info(stream, Req, undefined) ->
stream(Req, ID, Acc) ->
case cowboy_req:body(Req) of
{ok, <<>>, Req2} ->
- {shutdown, cowboy_req:reply(200, Req2), undefined};
+ {stop, cowboy_req:reply(200, Req2), undefined};
{_, Data, Req2} ->
parse_id(Req2, ID, << Acc/binary, Data/binary >>)
end.
@@ -30,5 +30,5 @@ parse_id(Req, ID, Data) ->
stream(Req, ID, Data)
end.
-terminate(shutdown, _, _) ->
+terminate(stop, _, _) ->
ok.
diff --git a/test/http_SUITE_data/rest_patch_resource.erl b/test/http_SUITE_data/rest_patch_resource.erl
index 03f780f..c1244e7 100644
--- a/test/http_SUITE_data/rest_patch_resource.erl
+++ b/test/http_SUITE_data/rest_patch_resource.erl
@@ -29,8 +29,8 @@ content_types_accepted(Req, State) ->
patch_text_plain(Req, State) ->
case cowboy_req:body(Req) of
- {ok, <<"halt">>, Req0} ->
- {halt, cowboy_req:reply(400, Req0), State};
+ {ok, <<"stop">>, Req0} ->
+ {stop, cowboy_req:reply(400, Req0), State};
{ok, <<"false">>, Req0} ->
{false, Req0, State};
{ok, _Body, Req0} ->
diff --git a/test/http_SUITE_data/rest_resource_etags.erl b/test/http_SUITE_data/rest_resource_etags.erl
index 1ea3005..0585761 100644
--- a/test/http_SUITE_data/rest_resource_etags.erl
+++ b/test/http_SUITE_data/rest_resource_etags.erl
@@ -23,10 +23,10 @@ generate_etag(Req, State) ->
{<<"\"etag-header-value\"">>, Req, State};
%% Invalid return values from generate_etag/2.
<<"binary-strong-unquoted">> ->
- cowboy_error_h:ignore(cowboy_http, quoted_string, 2),
+ cowboy_error_h:ignore(cow_http_hd, parse_etag, 1),
{<<"etag-header-value">>, Req, State};
<<"binary-weak-unquoted">> ->
- cowboy_error_h:ignore(cowboy_http, quoted_string, 2),
+ cowboy_error_h:ignore(cow_http_hd, parse_etag, 1),
{<<"W/etag-header-value">>, Req, State}
end.