aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2011-11-28 17:24:25 +0100
committerRaimo Niskanen <[email protected]>2011-12-08 16:54:30 +0100
commit5211d586d2c74a69bbefc2cdb7c22163d610b9f6 (patch)
treeec1c530c7ed0413f23e028da79e800300f25d895 /lib/kernel
parent7d79fd6eb57a073e58080d52e98881bd85f8fcc9 (diff)
downloadotp-5211d586d2c74a69bbefc2cdb7c22163d610b9f6.tar.gz
otp-5211d586d2c74a69bbefc2cdb7c22163d610b9f6.tar.bz2
otp-5211d586d2c74a69bbefc2cdb7c22163d610b9f6.zip
inet_res_SUITE: Improve nameserver handling
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/inet_res_SUITE.erl6
-rwxr-xr-xlib/kernel/test/inet_res_SUITE_data/run-named2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl
index 15b0ed5718..f3ba28e4f9 100644
--- a/lib/kernel/test/inet_res_SUITE.erl
+++ b/lib/kernel/test/inet_res_SUITE.erl
@@ -88,7 +88,7 @@ init_per_testcase(Func, Config) ->
inet_db:ins_alt_ns(IP, Port);
_ -> ok
end,
- Dog = test_server:timetrap(test_server:seconds(10)),
+ Dog = test_server:timetrap(test_server:seconds(20)),
[{nameserver,NsSpec},{res_lookup,Lookup},{watchdog,Dog}|Config]
catch
SkipReason ->
@@ -303,7 +303,7 @@ basic(Config) when is_list(Config) ->
{ok,Msg2} = inet_dns:decode(Bin2),
%%
%% lookup
- [IP] = inet_res:lookup(Name, in, a, [{nameservers,[NS]}]),
+ [IP] = inet_res:lookup(Name, in, a, [{nameservers,[NS]},verbose]),
%%
%% gethostbyname
{ok,#hostent{h_addr_list=[IP]}} = inet_res:gethostbyname(Name),
@@ -410,7 +410,7 @@ edns0(Config) when is_list(Config) ->
false = inet_db:res_option(edns), % ASSERT
true = inet_db:res_option(udp_payload_size) >= 1280, % ASSERT
%% These will fall back to TCP
- MXs = lists:sort(inet_res:lookup(Domain, in, mx, [{nameservers,[NS]}])),
+ MXs = lists:sort(inet_res:lookup(Domain, in, mx, [{nameservers,[NS]},verbose])),
%%
{ok,#hostent{h_addr_list=As}} = inet_res:getbyname(Domain++".", mx),
MXs = lists:sort(As),
diff --git a/lib/kernel/test/inet_res_SUITE_data/run-named b/lib/kernel/test/inet_res_SUITE_data/run-named
index 39e7b1d5aa..eeca680ab5 100755
--- a/lib/kernel/test/inet_res_SUITE_data/run-named
+++ b/lib/kernel/test/inet_res_SUITE_data/run-named
@@ -163,7 +163,7 @@ echo "Command: $NAMED $NAMED_FG -c $CONF_FILE"
NAMED_PID=$!
trap "kill -TERM $NAMED_PID >/dev/null 2>&1; wait $NAMED_PID >/dev/null 2>&1" \
0 1 2 3 15
-sleep 2 # Give name server time to load its zone files
+sleep 5 # Give name server time to load its zone files
if [ -f "$EXIT_FILE" ]; then
ERROR="`cat "$EXIT_FILE"`"
(exit "$ERROR")& error "$NAMED returned $ERROR on start"