0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Increase loop_handler_timeout timeouts

It seems that macOS GH runners don't do timeouts well.
This commit is contained in:
Loïc Hoguin 2023-12-15 16:22:06 +01:00
parent a81dc8af9d
commit 1547e9b93e
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
3 changed files with 3 additions and 3 deletions

View file

@ -14,7 +14,7 @@ init(Req, _) ->
{cowboy_loop, Req, undefined}.
info(message, Req, State) ->
erlang:send_after(200, self(), message),
erlang:send_after(500, self(), message),
{ok, Req, State, 100};
info(timeout, Req, State) ->
{stop, cowboy_req:reply(<<"299 OK!">>, Req), State}.

View file

@ -11,7 +11,7 @@
init(Req, _) ->
#{timeout := Timeout} = cowboy_req:match_qs([{timeout, int}], Req),
erlang:send_after(200, self(), message),
erlang:send_after(500, self(), message),
{cowboy_loop, Req, undefined, Timeout}.
info(message, Req, State) ->

View file

@ -103,7 +103,7 @@ timeout_info(Config) ->
timeout_init(Config) ->
doc("Ensure that loop handler idle timeouts trigger on time when set in init/2."),
ConnPid = gun_open(Config),
Ref = gun:get(ConnPid, "/loop_timeout_init?timeout=300",
Ref = gun:get(ConnPid, "/loop_timeout_init?timeout=1000",
[{<<"accept-encoding">>, <<"gzip">>}]),
{response, fin, 200, _} = gun:await(ConnPid, Ref),
Ref2 = gun:get(ConnPid, "/loop_timeout_init?timeout=100",