Skip to content

Commit

Permalink
add longer timeout for sendfile_get test
Browse files Browse the repository at this point in the history
git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1355 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information
vinoski committed Jan 18, 2009
1 parent 35cc40b commit 8c7d18d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions test/t2/Makefile
Expand Up @@ -12,10 +12,10 @@ all: conf setup app_test.beam
# or just make test to run all start test

test:
dd if=/dev/zero of=../../www/1000.txt bs=1024 count=1000
dd if=/dev/zero of=../../www/2000.txt bs=1024 count=2000
dd if=/dev/zero of=../../www/3000.txt bs=1024 count=3000
dd if=/dev/zero of=../../www/10000.txt bs=1024 count=10000
dd if=/dev/zero of=../../www/1000.txt bs=1024 count=1000 >/dev/null 2>&1
dd if=/dev/zero of=../../www/2000.txt bs=1024 count=2000 >/dev/null 2>&1
dd if=/dev/zero of=../../www/3000.txt bs=1024 count=3000 >/dev/null 2>&1
dd if=/dev/zero of=../../www/10000.txt bs=1024 count=10000 >/dev/null 2>&1
$(ERL) -noinput $(PA) -s tftest
$(MAKE) stop

Expand Down
10 changes: 5 additions & 5 deletions test/t2/app_test.erl
Expand Up @@ -147,7 +147,7 @@ do_server_options_recv(S, Hdrs) ->
{ok, Hdr} = gen_tcp:recv(S, 0, 2000),
server_options_recv(S, [Hdr|Hdrs]).


-define(SENDFILE_GET_TIMEOUT, 120000).

sendfile_get() ->
io:format("sendfile_get\n",[]),
Expand All @@ -159,7 +159,7 @@ sendfile_get() ->
?line {ok, "200", _Headers, _} =
ibrowse:send_req(
"http://localhost:8000/1000.txt",
[], get),
[], get, [], [], ?SENDFILE_GET_TIMEOUT),
SELF ! {self(), k1, done}
end)
end, L),
Expand All @@ -170,7 +170,7 @@ sendfile_get() ->
?line {ok, "200", _Headers, _} =
ibrowse:send_req(
"http://localhost:8000/2000.txt",
[], get),
[], get, [], [], ?SENDFILE_GET_TIMEOUT),
SELF ! {self(), k2, done}
end)
end, L),
Expand All @@ -181,7 +181,7 @@ sendfile_get() ->
?line {ok, "200", _Headers, _} =
ibrowse:send_req(
"http://localhost:8000/3000.txt",
[], get),
[], get, [], [], ?SENDFILE_GET_TIMEOUT),
SELF ! {self(), k3, done}
end)
end, L),
Expand All @@ -200,7 +200,7 @@ collect(L, Count, Tag) ->
{Pid, Tag, done} ->
io:format("(~p ~p)", [Tag, Count]),
collect(lists:delete(Pid, L), Count+1, Tag)
after 30000 ->
after ?SENDFILE_GET_TIMEOUT ->
io:format("TIMEOUT ~p\n~p~n",[process_info(self()), L]),
?line exit(timeout)
end.
Expand Down

0 comments on commit 8c7d18d

Please sign in to comment.