diff options
-rw-r--r-- | lib/common_test/test_server/ts.config | 4 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_tmo_SUITE.erl | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/common_test/test_server/ts.config b/lib/common_test/test_server/ts.config index cf3d269616..d05e4885fc 100644 --- a/lib/common_test/test_server/ts.config +++ b/lib/common_test/test_server/ts.config @@ -44,3 +44,7 @@ % {295,0,0,0,0,0,0,1}, % ["dummy6-ip6"] % }}. + +%% Used by erl_interface tests +%% Known hostname with an unreachable ip +%{test_host_not_reachable, "ghost.mydomain.com"}. diff --git a/lib/erl_interface/test/ei_tmo_SUITE.erl b/lib/erl_interface/test/ei_tmo_SUITE.erl index 4cd4202116..5ee7198c53 100644 --- a/lib/erl_interface/test/ei_tmo_SUITE.erl +++ b/lib/erl_interface/test/ei_tmo_SUITE.erl @@ -25,11 +25,10 @@ -include_lib("kernel/include/inet.hrl"). -include("ei_tmo_SUITE_data/ei_tmo_test_cases.hrl"). --define(dummy_host,test01). - -export([all/0, suite/0, init_per_testcase/2, end_per_testcase/2, framework_check/1, ei_accept_tmo/1, ei_connect_tmo/1, ei_send_tmo/1, + ei_connect_tmo/0, ei_recv_tmo/1]). suite() -> @@ -196,6 +195,8 @@ do_one_send_failure(Config,From,FakeName,CName,VxSim) -> %% Check accept with timeouts. +ei_connect_tmo() -> [{require, test_host_not_reachable}]. + ei_connect_tmo(Config) when is_list(Config) -> %dbg:tracer(), %dbg:p(self()), @@ -311,12 +312,13 @@ make_node(X) -> make_and_check_dummy() -> % First check that the host has an ip and is *not* reachable - case gen_tcp:connect(?dummy_host,23,[{active,false}],5000) of + HostNotReachable = ct:get_config(test_host_not_reachable), + case gen_tcp:connect(HostNotReachable, 23, [{active,false}],5000) of {error,timeout} -> ok; {error,ehostunreach} -> ok end, - list_to_atom("dummy@"++atom_to_list(?dummy_host)). + list_to_atom("dummy@"++HostNotReachable). %% %% Stolen from the erl_distribution_wb_test in kernel |