From 6cd69c84f6c44434b4a09ad4050320fce9ea077f Mon Sep 17 00:00:00 2001 From: Fredrik Gustafsson Date: Fri, 9 Nov 2012 15:14:36 +0100 Subject: =?UTF-8?q?Added=20testcases=20f=C3=B6r=20minimum=5Fbytes=5Fper=5F?= =?UTF-8?q?second=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/inets/test/httpd_basic_SUITE.erl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/inets/test') 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 | _]) -> -- cgit v1.2.3