aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-03-13 14:28:30 +0100
committerMicael Karlberg <[email protected]>2012-03-13 14:28:30 +0100
commit39b1ef1844cbf275a3380e123bcefee0e771430f (patch)
treef4fe18d5c00a6eb4b17abfee47f4d8ab61ff055d /lib/inets/test
parent8f83fe72fe713a64e67490020e8d375b620f4abe (diff)
parent5cefb654a99eae754badd417de493acc59f8efb3 (diff)
downloadotp-39b1ef1844cbf275a3380e123bcefee0e771430f.tar.gz
otp-39b1ef1844cbf275a3380e123bcefee0e771430f.tar.bz2
otp-39b1ef1844cbf275a3380e123bcefee0e771430f.zip
Merge branch 'bmk/inets/httpc/get_options/OTP-9979' into bmk/inets/inets59_integration2
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_SUITE.erl41
1 files changed, 25 insertions, 16 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index a18d079426..61bb5214f3 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -275,20 +275,6 @@ init_per_testcase(Case, Timeout, Config) ->
%% inets:enable_trace(max, io, httpc),
%% inets:enable_trace(max, io, all),
- %% <IPv6>
- % Set default ipfamily to the same as the main server has by default
- %% This makes the client try w/ ipv6 before falling back to ipv4,
- %% as that is what the server is configured to do.
- %% Note that this is required for the tests to run on *BSD w/ ipv6 enabled
- %% as well as on Windows. The Linux behaviour of allowing ipv4 connects
- %% to ipv6 sockets is not required or even encouraged.
-
- httpc:set_options([{ipfamily, inet6fb4}]),
-
- %% Note that the IPv6 trest case *must* use inet6,
- %% so this value will be overwritten (see "ipv6_" below).
- %% </IPv6>
-
NewConfig =
case atom_to_list(Case) of
[$s, $s, $l | _] ->
@@ -371,7 +357,8 @@ init_per_testcase(Case, Timeout, Config) ->
inets:start(httpc,
[{profile, Profile},
{data_dir, PrivDir}], stand_alone),
- httpc:set_options([{ipfamily, inet6}], ProfilePid),
+ ok = httpc:set_options([{ipfamily, inet6}],
+ ProfilePid),
tsp("httpc profile pid: ~p", [ProfilePid]),
[{watchdog, Dog}, {profile, ProfilePid}| TmpConfig]
catch
@@ -410,9 +397,31 @@ init_per_testcase(Case, Timeout, Config) ->
[{watchdog, Dog}, {local_server, Server} | TmpConfig2]
end,
+ %% <IPv6>
+ %% Set default ipfamily to the same as the main server has by default
+ %% This makes the client try w/ ipv6 before falling back to ipv4,
+ %% as that is what the server is configured to do.
+ %% Note that this is required for the tests to run on *BSD w/ ipv6 enabled
+ %% as well as on Windows. The Linux behaviour of allowing ipv4 connects
+ %% to ipv6 sockets is not required or even encouraged.
+
+ tsp("init_per_testcase -> Options before ipfamily set: ~n~p",
+ [httpc:get_options(all)]),
+ ok = httpc:set_options([{ipfamily, inet6fb4}]),
+ tsp("init_per_testcase -> Options after ipfamily set: ~n~p",
+ [httpc:get_options(all)]),
+
+ %% Note that the IPv6 test case(s) *must* use inet6,
+ %% so this value will be overwritten (see "ipv6_" below).
+ %% </IPv6>
+
%% This will fail for the ipv6_ - cases (but that is ok)
ProxyExceptions = ["localhost", ?IPV6_LOCAL_HOST],
- httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
+ tsp("init_per_testcase -> Options before proxy set: ~n~p",
+ [httpc:get_options(all)]),
+ ok = httpc:set_options([{proxy, {{?PROXY, ?PROXY_PORT}, ProxyExceptions}}]),
+ tsp("init_per_testcase -> Options after proxy set: ~n~p",
+ [httpc:get_options(all)]),
inets:enable_trace(max, io, httpc),
%% inets:enable_trace(max, io, all),
%% snmp:set_trace([gen_tcp]),