diff options
author | Loïc Hoguin <[email protected]> | 2018-07-04 10:57:05 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-07-04 10:57:05 +0200 |
commit | b400e34386ec0dc3f290da6c4671d7d0621d2fe6 (patch) | |
tree | 2a59bcbe0ffbdb15ed7c22465b1473dbe1ba0502 /test/shutdown_SUITE.erl | |
parent | f4a4843b1b242a3ee0de3f6dd76703f7c6492213 (diff) | |
download | ranch-b400e34386ec0dc3f290da6c4671d7d0621d2fe6.tar.gz ranch-b400e34386ec0dc3f290da6c4671d7d0621d2fe6.tar.bz2 ranch-b400e34386ec0dc3f290da6c4671d7d0621d2fe6.zip |
Better distinguish between Ranch and socket options
A map should now be used when specifying transport options
that contain more than just socket options. It is still
possible to pass a list of socket options directly as a
convenience.
The ack_timeout is renamed to handshake_timeout when
specified as a map. This corresponds to the new function
ranch:handshake/1,2 that will be favored in Ranch 2.0.
Specifying Ranch-specific options via the proplist will
no longer be possible starting from Ranch 2.0.
Diffstat (limited to 'test/shutdown_SUITE.erl')
-rw-r--r-- | test/shutdown_SUITE.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/shutdown_SUITE.erl b/test/shutdown_SUITE.erl index d46e223..249458e 100644 --- a/test/shutdown_SUITE.erl +++ b/test/shutdown_SUITE.erl @@ -30,7 +30,7 @@ brutal_kill(_) -> doc("Shutdown Ranch listener with shutdown option set to brutal_kill."), Name = name(), {ok, ListenerSup} = ranch:start_listener(Name, - ranch_tcp, [{port, 0}, {shutdown, brutal_kill}], + ranch_tcp, #{shutdown => brutal_kill}, echo_protocol, []), Port = ranch:get_port(Name), {ok, _} = gen_tcp:connect("localhost", Port, []), @@ -50,7 +50,7 @@ infinity(_) -> doc("Shutdown Ranch listener with shutdown option set to infinity."), Name = name(), {ok, ListenerSup} = ranch:start_listener(Name, - ranch_tcp, [{port, 0}, {shutdown, infinity}], + ranch_tcp, #{shutdown => infinity}, echo_protocol, []), Port = ranch:get_port(Name), {ok, _} = gen_tcp:connect("localhost", Port, []), @@ -72,7 +72,7 @@ infinity_trap_exit(_) -> "until the protocol process terminates."), Name = name(), {ok, ListenerSup} = ranch:start_listener(Name, - ranch_tcp, [{port, 0}, {shutdown, infinity}], + ranch_tcp, #{shutdown => infinity}, trap_exit_protocol, []), Port = ranch:get_port(Name), {ok, _} = gen_tcp:connect("localhost", Port, []), @@ -101,7 +101,7 @@ timeout(_) -> doc("Shutdown Ranch listener with shutdown option set to 500ms."), Name = name(), {ok, ListenerSup} = ranch:start_listener(Name, - ranch_tcp, [{port, 0}, {shutdown, 500}], + ranch_tcp, #{shutdown => 500}, echo_protocol, []), Port = ranch:get_port(Name), {ok, _} = gen_tcp:connect("localhost", Port, []), @@ -123,7 +123,7 @@ timeout_trap_exit(_) -> "after the 500ms timeout."), Name = name(), {ok, ListenerSup} = ranch:start_listener(Name, - ranch_tcp, [{port, 0}, {shutdown, 500}], + ranch_tcp, #{shutdown => 500}, trap_exit_protocol, []), Port = ranch:get_port(Name), {ok, _} = gen_tcp:connect("localhost", Port, []), |