diff options
author | Micael Karlberg <[email protected]> | 2011-11-28 19:49:24 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-11-28 19:49:24 +0100 |
commit | 5df28c6c7d3c5948ff02ae197f1f11eff96cc68d (patch) | |
tree | eac37df59766a5810027999532c443b21ccb032c /lib/inets/test/httpc_SUITE.erl | |
parent | 7de36e35a3409886495a19206bcef934b86e7614 (diff) | |
parent | ef692b0461b263a2025d289c31d8f491b53311e5 (diff) | |
download | otp-5df28c6c7d3c5948ff02ae197f1f11eff96cc68d.tar.gz otp-5df28c6c7d3c5948ff02ae197f1f11eff96cc68d.tar.bz2 otp-5df28c6c7d3c5948ff02ae197f1f11eff96cc68d.zip |
Merge branch 'bmk/inets/misc_test_improvements/OTP-9757' into bmk/inets/inets58_integration2
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index 2b580cd95d..6e69c9a469 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -145,14 +145,6 @@ groups() -> ]. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config %% Config - [tuple()] @@ -226,9 +218,7 @@ init_per_testcase(initial_server_connect = Case, Config) -> %% this test case does not work unless it does try begin - ensure_started(crypto), - ensure_started(public_key), - ensure_started(ssl), + ?ENSURE_STARTED([crypto, public_key, ssl]), inets:start(), Config end @@ -267,10 +257,12 @@ init_per_testcase(Case, Timeout, Config) -> NewConfig = case atom_to_list(Case) of [$s, $s, $l | _] -> + ?ENSURE_STARTED([crypto, public_key, ssl]), init_per_testcase_ssl(ssl, PrivDir, SslConfFile, [{watchdog, Dog} | TmpConfig]); [$e, $s, $s, $l | _] -> + ?ENSURE_STARTED([crypto, public_key, ssl]), init_per_testcase_ssl(essl, PrivDir, SslConfFile, [{watchdog, Dog} | TmpConfig]); @@ -282,7 +274,7 @@ init_per_testcase(Case, Timeout, Config) -> inets:start(), tsp("init_per_testcase -> " "[proxy case] start crypto, public_key and ssl"), - try ensure_started([crypto, public_key, ssl]) of + try ?ENSURE_STARTED([crypto, public_key, ssl]) of ok -> [{watchdog, Dog} | TmpConfig] catch @@ -335,8 +327,8 @@ init_per_testcase(Case, Timeout, Config) -> end; "ipv6_" ++ _Rest -> - %% Ensure needed apps (crypto, public_key and ssl) started - try ensure_started([crypto, public_key, ssl]) of + %% Ensure needed apps (crypto, public_key and ssl) are started + try ?ENSURE_STARTED([crypto, public_key, ssl]) of ok -> Profile = ipv6, %% A stand-alone profile is represented by a pid() @@ -3553,21 +3545,5 @@ dummy_ssl_server_hang_loop(_) -> end. -ensure_started([]) -> - ok; -ensure_started([App|Apps]) -> - ensure_started(App), - ensure_started(Apps); -ensure_started(App) when is_atom(App) -> - case (catch application:start(App)) of - ok -> - ok; - {error, {already_started, _}} -> - ok; - Error -> - throw({error, {failed_starting, App, Error}}) - end. - - skip(Reason) -> {skip, Reason}. |