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

Speed up testing large static files, 32MB instead of 512MB

This commit is contained in:
Loïc Hoguin 2018-05-17 11:35:08 +02:00
parent aca57c2e33
commit 619273e10e
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -107,7 +107,7 @@ end_per_group(Name, _) ->
init_large_file(Filename) ->
case os:type() of
{unix, _} ->
"" = os:cmd("truncate -s 512M " ++ Filename),
"" = os:cmd("truncate -s 32M " ++ Filename),
ok;
{win32, _} ->
ok
@ -422,7 +422,7 @@ dir_large_file(Config) ->
[{<<"accept-encoding">>, <<"gzip">>}]),
{response, nofin, 200, RespHeaders} = gun:await(ConnPid, Ref),
{_, <<"application/octet-stream">>} = lists:keyfind(<<"content-type">>, 1, RespHeaders),
Size = 512*1024*1024,
Size = 32*1024*1024,
{ok, Size} = do_dir_large_file(ConnPid, Ref, 0),
ok.