diff options
author | Fredrik Gustafsson <[email protected]> | 2012-11-09 15:14:36 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-11-09 15:14:36 +0100 |
commit | 6cd69c84f6c44434b4a09ad4050320fce9ea077f (patch) | |
tree | a592fc37e962f77f8140e677f05738dc2c468047 /lib/inets | |
parent | 39537f88c45304d0fbd1cd61882fc7df7473041a (diff) | |
download | otp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.tar.gz otp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.tar.bz2 otp-6cd69c84f6c44434b4a09ad4050320fce9ea077f.zip |
Added testcases för minimum_bytes_per_second option
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/test/httpd_basic_SUITE.erl | 13 |
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 | _]) -> |