aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test/ei_tmo_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-11-18 12:31:22 +0100
committerSverker Eriksson <[email protected]>2016-04-07 18:41:47 +0200
commitbd6a725af02724ca783d7026e650cd380cc1c68c (patch)
tree9e82ff323de45bca86fd4c70f8141e3d303129bc /lib/erl_interface/test/ei_tmo_SUITE.erl
parent995f81ed452f95c065bd94d62cb69dbf5289be76 (diff)
downloadotp-bd6a725af02724ca783d7026e650cd380cc1c68c.tar.gz
otp-bd6a725af02724ca783d7026e650cd380cc1c68c.tar.bz2
otp-bd6a725af02724ca783d7026e650cd380cc1c68c.zip
test_server,erl_interface: Add test_host_not_reachable config
Diffstat (limited to 'lib/erl_interface/test/ei_tmo_SUITE.erl')
-rw-r--r--lib/erl_interface/test/ei_tmo_SUITE.erl10
1 files changed, 6 insertions, 4 deletions
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