From 2888e9e6ef8b3f234a118eeecaadaa7315ce7e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 15 Sep 2019 16:30:09 +0200 Subject: Increase the period for req_SUITE:read_body_period This should increase the likelihood of the test succeeding on slower systems when run over TLS. --- test/req_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/req_SUITE.erl') diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl index cbb0991..f58154f 100644 --- a/test/req_SUITE.erl +++ b/test/req_SUITE.erl @@ -53,7 +53,7 @@ init_dispatch(Config) -> {"/crash/:key/period", echo_h, #{length => 999999999, period => 1000, crash => true}}, {"/no-opts/:key", echo_h, #{crash => true}}, {"/opts/:key/length", echo_h, #{length => 1000}}, - {"/opts/:key/period", echo_h, #{length => 999999999, period => 1000}}, + {"/opts/:key/period", echo_h, #{length => 999999999, period => 2000}}, {"/opts/:key/timeout", echo_h, #{timeout => 1000, crash => true}}, {"/100-continue/:key", echo_h, []}, {"/full/:key", echo_h, []}, @@ -461,15 +461,15 @@ read_body_mtu(Config) -> ok. read_body_period(Config) -> - doc("Read the request body for at most 1 second."), + doc("Read the request body for at most 2 seconds."), ConnPid = gun_open(Config), Body = <<0:8000000>>, Ref = gun:headers(ConnPid, "POST", "/opts/read_body/period", [ {<<"content-length">>, integer_to_binary(byte_size(Body) * 2)} ]), - %% The body is sent twice, first with nofin, then wait 2 seconds, then again with fin. + %% The body is sent twice, first with nofin, then wait 3 seconds, then again with fin. gun:data(ConnPid, Ref, nofin, Body), - timer:sleep(2000), + timer:sleep(3000), gun:data(ConnPid, Ref, fin, Body), {response, nofin, 200, _} = gun:await(ConnPid, Ref), {ok, Body} = gun:await_body(ConnPid, Ref), -- cgit v1.2.3