diff options
author | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
commit | 8cbd8c1882e33380875f2723cad258784ba3a360 (patch) | |
tree | e04ee8ab09bffcfe8c8bab25e509b626dc42be24 /test | |
parent | 903f6f4c7d7aca0432e8f8ac3c1790e82b1428fd (diff) | |
download | cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.gz cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.bz2 cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.zip |
Rename 'shutdown' close reason and tuples to 'stop'
The 'shutdown' atom has a specific meaning inside OTP. We are
instead going to use 'stop' which is pretty much the equivalent
of what we actually do. 'shutdown' is now reserved for future
special processes implementation.
Diffstat (limited to 'test')
-rw-r--r-- | test/handlers/long_polling_h.erl | 4 | ||||
-rw-r--r-- | test/handlers/loop_handler_body_h.erl | 4 | ||||
-rw-r--r-- | test/handlers/loop_handler_timeout_h.erl | 2 | ||||
-rw-r--r-- | test/http_SUITE_data/http_loop_stream_recv.erl | 4 |
4 files changed, 7 insertions, 7 deletions
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_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. |