aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-01-17 17:16:38 +0100
committerLoïc Hoguin <[email protected]>2024-01-17 20:56:46 +0100
commitecf3d43613ff69dd734411b35849dbfb0b33229b (patch)
tree228d267ce663374917367c650a1553b99f794c53
parentcff9938a66e5529fae13d815ca9879a04a0ebf99 (diff)
downloadcowboy-ecf3d43613ff69dd734411b35849dbfb0b33229b.tar.gz
cowboy-ecf3d43613ff69dd734411b35849dbfb0b33229b.tar.bz2
cowboy-ecf3d43613ff69dd734411b35849dbfb0b33229b.zip
Improve reliability of a few tests
GitHub Actions runners are not as good as self-hosted BuildKite so some adjustments need to be made to timeouts and such.
-rw-r--r--test/http_SUITE.erl2
-rw-r--r--test/req_SUITE.erl3
2 files changed, 4 insertions, 1 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index fb9f93b..bfe55da 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -329,6 +329,7 @@ do_idle_timeout_on_send(Config, Protocol) ->
try
ConnPid = gun_open([{type, tcp}, {protocol, Protocol}, {port, Port}|Config]),
{ok, Protocol} = gun:await_up(ConnPid),
+ timer:sleep(500),
#{socket := Socket} = gun:info(ConnPid),
Pid = get_remote_pid_tcp(Socket),
StreamRef = gun:get(ConnPid, "/streamed_result/10/250"),
@@ -359,6 +360,7 @@ do_idle_timeout_reset_on_send(Config, Protocol) ->
try
ConnPid = gun_open([{type, tcp}, {protocol, Protocol}, {port, Port}|Config]),
{ok, Protocol} = gun:await_up(ConnPid),
+ timer:sleep(500),
#{socket := Socket} = gun:info(ConnPid),
Pid = get_remote_pid_tcp(Socket),
StreamRef = gun:get(ConnPid, "/streamed_result/10/250"),
diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl
index f407853..04da8fa 100644
--- a/test/req_SUITE.erl
+++ b/test/req_SUITE.erl
@@ -57,7 +57,8 @@ init_dispatch(Config) ->
{"/resp/:key[/:arg]", resp_h, []},
{"/multipart[/:key]", multipart_h, []},
{"/args/:key/:arg[/:default]", echo_h, []},
- {"/crash/:key/period", echo_h, #{length => 999999999, period => 1000, crash => true}},
+ {"/crash/:key/period", echo_h,
+ #{length => 999999999, period => 1000, timeout => 5000, crash => true}},
{"/no-opts/:key", echo_h, #{crash => true}},
{"/opts/:key/length", echo_h, #{length => 1000}},
{"/opts/:key/period", echo_h, #{length => 999999999, period => 2000}},