diff options
author | Fredrik Gustafsson <[email protected]> | 2012-11-16 11:54:15 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2012-11-16 11:54:15 +0100 |
commit | 9c3a39fa8a5edfaea75226579e28aab49506902c (patch) | |
tree | 780b40dc7e5d97ed095a422745efdf235bf2f82a /lib/inets/test/httpd_basic_SUITE.erl | |
parent | 7e7d5d522f1a46d7bdda3980f6e9c5649a35eca6 (diff) | |
parent | 5431f00a394e4ebfd2b1691afcffdc617bb06fd1 (diff) | |
download | otp-9c3a39fa8a5edfaea75226579e28aab49506902c.tar.gz otp-9c3a39fa8a5edfaea75226579e28aab49506902c.tar.bz2 otp-9c3a39fa8a5edfaea75226579e28aab49506902c.zip |
Merge branch 'fredrik/inets/slowdos/OTP-10392' into maint
* fredrik/inets/slowdos/OTP-10392:
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 | _]) -> |