aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/http_format_SUITE.erl2
-rw-r--r--lib/inets/test/httpc_SUITE.erl20
-rw-r--r--lib/inets/test/httpc_proxy_SUITE.erl2
-rw-r--r--lib/inets/test/httpd_SUITE.erl15
-rw-r--r--lib/inets/test/httpd_bench_SUITE.erl11
5 files changed, 33 insertions, 17 deletions
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index d6b0e5f9f5..0a5aed67d5 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -435,7 +435,7 @@ http_request(Config) when is_list(Config) ->
[<<>>, Length1], HttpBody1)).
%%-------------------------------------------------------------------------
validate_request_line() ->
- [{doc, "Test httpd_request:validate/3. Makes sure you can not get past"
+ [{doc, "Test httpd_request:validate/3. Makes sure you cannot get past"
" the server_root and that the request is recognized by the server"
" and protcol version."}].
validate_request_line(Config) when is_list(Config) ->
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 8357e02014..d4b33ae2c6 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -339,14 +339,6 @@ end_per_testcase(Case, Config)
end_per_testcase(_Case, _Config) ->
ok.
-is_ipv6_supported() ->
- case gen_udp:open(0, [inet6]) of
- {ok, Socket} ->
- gen_udp:close(Socket),
- true;
- _ ->
- false
- end.
%%--------------------------------------------------------------------
@@ -1612,7 +1604,8 @@ post_with_content_type(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
request_options() ->
- [{doc, "Test http get request with socket options against local server (IPv6)"}].
+ [{require, ipv6_hosts},
+ {doc, "Test http get request with socket options against local server (IPv6)"}].
request_options(Config) when is_list(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), []},
{ok, {{_,200,_}, [_ | _], _ = [_ | _]}} = httpc:request(get, Request, [],
@@ -2945,3 +2938,12 @@ receive_stream_n(Ref, N) ->
ct:pal("Data: ~p", [Data]),
receive_stream_n(Ref, N-1)
end.
+
+is_ipv6_supported() ->
+ {ok, Hostname0} = inet:gethostname(),
+ try
+ lists:member(list_to_atom(Hostname0), ct:get_config(ipv6_hosts))
+ catch
+ _: _ ->
+ false
+ end.
diff --git a/lib/inets/test/httpc_proxy_SUITE.erl b/lib/inets/test/httpc_proxy_SUITE.erl
index 198b245399..3ee7981660 100644
--- a/lib/inets/test/httpc_proxy_SUITE.erl
+++ b/lib/inets/test/httpc_proxy_SUITE.erl
@@ -534,7 +534,7 @@ init_local_proxy(Config) ->
ct:fail({local_proxy_start_failed,Error})
end;
_ ->
- {skip,"Platform can not run local proxy start script"}
+ {skip,"Platform cannot run local proxy start script"}
end.
init_local_proxy_string(String, Config) ->
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 5b6740fba3..fcb9ad7905 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -78,7 +78,8 @@ all() ->
{group, http_rel_path_script_alias},
{group, http_not_sup},
{group, https_not_sup},
- mime_types_format
+ mime_types_format,
+ erl_script_timeout_option
].
groups() ->
@@ -1777,6 +1778,18 @@ mime_types_format(Config) when is_list(Config) ->
{"hqx","application/mac-binhex40"}]} = httpd_conf:load_mime_types(MimeTypes).
+erl_script_timeout_option(Config) when is_list(Config) ->
+ inets:start(),
+ {ok, Pid} = inets:start(httpd, [{erl_script_timeout, 215},
+ {server_name, "test"},
+ {port,0},
+ {server_root, "."},
+ {document_root, "."}]),
+ Info = httpd:info(Pid),
+ 215 = proplists:get_value(erl_script_timeout, Info),
+ inets:stop().
+
+
%%--------------------------------------------------------------------
%% Internal functions -----------------------------------
%%--------------------------------------------------------------------
diff --git a/lib/inets/test/httpd_bench_SUITE.erl b/lib/inets/test/httpd_bench_SUITE.erl
index 4b549dcb5b..087516f56c 100644
--- a/lib/inets/test/httpd_bench_SUITE.erl
+++ b/lib/inets/test/httpd_bench_SUITE.erl
@@ -37,7 +37,8 @@
%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
suite() ->
- [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
+ [{timetrap, {minutes, 1}},
+ {ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
all() ->
[
@@ -499,8 +500,8 @@ start_dummy("http"= Protocol, Config) ->
Conf = [
%%{big, filename:join(DataDir, "1M_file")},
%%{small, filename:join(DataDir, "1k_file")},
- {big, {gen, crypto:rand_bytes(1000000)}},
- {small, {gen, crypto:rand_bytes(1000)}},
+ {big, {gen, crypto:strong_rand_bytes(1000000)}},
+ {small, {gen, crypto:strong_rand_bytes(1000)}},
{http_version, HTTPVersion},
{keep_alive, ?config(keep_alive, Config)}
],
@@ -519,8 +520,8 @@ start_dummy("https" = Protocol, Config) ->
Opts = [{active, true}, {nodelay, true}, {reuseaddr, true} | SSLOpts],
Conf = [%%{big, filename:join(DataDir, "1M_file")},
%%{small, filename:join(DataDir, "1k_file")},
- {big, {gen, crypto:rand_bytes(1000000)}},
- {small, {gen, crypto:rand_bytes(1000)}},
+ {big, {gen, crypto:strong_rand_bytes(1000000)}},
+ {small, {gen, crypto:strong_rand_bytes(1000)}},
{http_version, HTTPVersion},
{keep_alive, ?config(keep_alive, Config)}
],