aboutsummaryrefslogtreecommitdiffstats
path: root/test/gun_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/gun_SUITE.erl')
-rw-r--r--test/gun_SUITE.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl
index 842d40c..a7e2169 100644
--- a/test/gun_SUITE.erl
+++ b/test/gun_SUITE.erl
@@ -110,6 +110,20 @@ info(_) ->
#{sock_ip := _, sock_port := _} = gun:info(Pid),
ok.
+keepalive_infinity(_) ->
+ doc("Ensure infinity for keepalive is accepted by all protocols."),
+ {ok, Pid} = gun:open("localhost", 12345, #{
+ http_opts => #{keepalive => infinity},
+ http2_opts => #{keepalive => infinity},
+ retry => 0}),
+ Ref = monitor(process, Pid),
+ receive
+ {'DOWN', Ref, process, Pid, {{gone, _}, _}} ->
+ ok
+ after 5000 ->
+ error(timeout)
+ end.
+
reply_to(_) ->
doc("The reply_to option allows using a separate process for requests."),
do_reply_to(http),