From 1547e9b93e9a2b40e03edc6e84015dcbf9dccadb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 15 Dec 2023 16:22:06 +0100 Subject: Increase loop_handler_timeout timeouts It seems that macOS GH runners don't do timeouts well. --- test/handlers/loop_handler_timeout_info_h.erl | 2 +- test/handlers/loop_handler_timeout_init_h.erl | 2 +- test/loop_handler_SUITE.erl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/handlers/loop_handler_timeout_info_h.erl b/test/handlers/loop_handler_timeout_info_h.erl index 92f652e..7a1ccba 100644 --- a/test/handlers/loop_handler_timeout_info_h.erl +++ b/test/handlers/loop_handler_timeout_info_h.erl @@ -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}. diff --git a/test/handlers/loop_handler_timeout_init_h.erl b/test/handlers/loop_handler_timeout_init_h.erl index ba0b34b..7908fda 100644 --- a/test/handlers/loop_handler_timeout_init_h.erl +++ b/test/handlers/loop_handler_timeout_init_h.erl @@ -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) -> diff --git a/test/loop_handler_SUITE.erl b/test/loop_handler_SUITE.erl index 04aa629..3a91e08 100644 --- a/test/loop_handler_SUITE.erl +++ b/test/loop_handler_SUITE.erl @@ -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", -- cgit v1.2.3