aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-09 15:14:36 +0100
committerFredrik Gustafsson <[email protected]>2012-11-09 15:14:36 +0100
commit6cd69c84f6c44434b4a09ad4050320fce9ea077f (patch)
treea592fc37e962f77f8140e677f05738dc2c468047 /lib/inets/test
parent39537f88c45304d0fbd1cd61882fc7df7473041a (diff)
downloadotp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.tar.gz
otp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.tar.bz2
otp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.zip
Added testcases för minimum_bytes_per_second option
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 7a476ea14a..110293b307 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -34,7 +34,8 @@ all() ->
[
uri_too_long_414,
header_too_long_413,
- escaped_url_in_error_body
+ escaped_url_in_error_body,
+ slowdose
].
groups() ->
@@ -278,7 +279,15 @@ escaped_url_in_error_body(Config) when is_list(Config) ->
inets:stop(httpd, Pid),
tsp("escaped_url_in_error_body -> done"),
ok.
-
+slowdose(Config) when is_list(Config) ->
+ {ok, Pid} = inets:start(httpd, [{port, 0}, {server_name, "test"}, {server_root, "/tmp"}, {document_root, "/tmp"}, {minimum_bytes_per_second, 200}]),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ {ok, Socket} = gen_tcp:connect("localhost", Port, []),
+ receive
+ after 2000 ->
+ {error, closed} = gen_tcp:send(Socket, "Hey")
+ end.
find_URL_path([]) ->
"";
find_URL_path(["URL", URL | _]) ->