diff options
author | Fredrik Gustafsson <[email protected]> | 2012-11-16 11:55:03 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-11-16 11:55:03 +0100 |
commit | 8d0a8ed931deec5a52eaf3e63a1e99a9ed0aeba8 (patch) | |
tree | bdd0c3ff342d4311d196ef4e4fd243ce72fa575b /lib/inets/test/httpd_basic_SUITE.erl | |
parent | d3ceb8f5194ff323971163d7758bcbbde74cd0ee (diff) | |
parent | 9c3a39fa8a5edfaea75226579e28aab49506902c (diff) | |
download | otp-8d0a8ed931deec5a52eaf3e63a1e99a9ed0aeba8.tar.gz otp-8d0a8ed931deec5a52eaf3e63a1e99a9ed0aeba8.tar.bz2 otp-8d0a8ed931deec5a52eaf3e63a1e99a9ed0aeba8.zip |
Merge branch 'maint'
* maint:
Increased waiting time to check if socket is down
Fine adjustments of slowdos alg
Changes to slowdos testcase
Doc for test case slowdose
Bumped version nr
Added testcases för minimum_bytes_per_second option
Reduced checking of bytes per second to every second
Documentation for minimum_bytes_per_seconds option
Changed property to minimum_bytes_per_second and checking if is integer on start
Changed to Bytes Per Second when checking clients rate, new options {byte_limit, integer()}
Option {bit_limit, integer()} to close sockets where clients are too slow
Diffstat (limited to 'lib/inets/test/httpd_basic_SUITE.erl')
-rw-r--r-- | lib/inets/test/httpd_basic_SUITE.erl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl index 7a476ea14a..523cf9d38c 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,18 @@ escaped_url_in_error_body(Config) when is_list(Config) -> inets:stop(httpd, Pid), tsp("escaped_url_in_error_body -> done"), ok. - +slowdose(doc) -> + ["Testing minimum bytes per second option"]; +slowdose(Config) when is_list(Config) -> + HttpdConf = ?config(httpd_conf, Config), + {ok, Pid} = inets:start(httpd, [{port, 0}, {minimum_bytes_per_second, 200}|HttpdConf]), + Info = httpd:info(Pid), + Port = proplists:get_value(port, Info), + {ok, Socket} = gen_tcp:connect("localhost", Port, []), + receive + after 6000 -> + {error, closed} = gen_tcp:send(Socket, "Hey") + end. find_URL_path([]) -> ""; find_URL_path(["URL", URL | _]) -> |