mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Change a few flaky tests to use timetrap and infinity timeouts
The experiment was successful in Gun, let's see if it helps with Cowboy as well.
This commit is contained in:
parent
8471788826
commit
2b65b575c6
2 changed files with 13 additions and 7 deletions
|
@ -22,6 +22,9 @@
|
|||
|
||||
%% ct.
|
||||
|
||||
suite() ->
|
||||
[{timetrap, 30000}].
|
||||
|
||||
all() ->
|
||||
cowboy_test:common_all().
|
||||
|
||||
|
@ -532,11 +535,11 @@ do_read_body_expect_100_continue(Path, Config) ->
|
|||
{<<"content-length">>, integer_to_binary(byte_size(Body))}
|
||||
],
|
||||
Ref = gun:post(ConnPid, Path, Headers),
|
||||
{inform, 100, []} = gun:await(ConnPid, Ref),
|
||||
{inform, 100, []} = gun:await(ConnPid, Ref, infinity),
|
||||
gun:data(ConnPid, Ref, fin, Body),
|
||||
{response, IsFin, 200, RespHeaders} = gun:await(ConnPid, Ref),
|
||||
{response, IsFin, 200, RespHeaders} = gun:await(ConnPid, Ref, infinity),
|
||||
{ok, RespBody} = case IsFin of
|
||||
nofin -> gun:await_body(ConnPid, Ref);
|
||||
nofin -> gun:await_body(ConnPid, Ref, infinity);
|
||||
fin -> {ok, <<>>}
|
||||
end,
|
||||
gun:close(ConnPid),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue