summaryrefslogtreecommitdiff
path: root/lib/erl_interface/test
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2020-04-21 10:57:48 +0200
committerJohn Högberg <john@erlang.org>2020-04-24 08:45:16 +0200
commitb86ccf75ff2d9acf5a205c3f376df6323b16986f (patch)
treea0338e7eea3f86c5393c4a0a17b1d4888df1eacc /lib/erl_interface/test
parent858b2e244032fb2b667c2a04f0e6d9f7cf5c7b46 (diff)
downloaderlang-b86ccf75ff2d9acf5a205c3f376df6323b16986f.tar.gz
erl_call: Add -timeout option
Diffstat (limited to 'lib/erl_interface/test')
-rw-r--r--lib/erl_interface/test/erl_call_SUITE.erl21
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/erl_interface/test/erl_call_SUITE.erl b/lib/erl_interface/test/erl_call_SUITE.erl
index e31b0c76f7..339131fed6 100644
--- a/lib/erl_interface/test/erl_call_SUITE.erl
+++ b/lib/erl_interface/test/erl_call_SUITE.erl
@@ -26,13 +26,15 @@
-export([all/0, smoke/1,
random_cnode_name/1,
test_connect_to_host_port/1,
- unresolvable_hostname/1]).
+ unresolvable_hostname/1,
+ timeout/1]).
all() ->
[smoke,
random_cnode_name,
test_connect_to_host_port,
- unresolvable_hostname].
+ unresolvable_hostname,
+ timeout].
smoke(Config) when is_list(Config) ->
Name = atom_to_list(?MODULE)
@@ -136,6 +138,21 @@ unresolvable_hostname(_Config) ->
ok.
+%% OTP-16604: Test the -timeout option
+timeout(_Config) ->
+ Name = atom_to_list(?MODULE)
+ ++ "-"
+ ++ integer_to_list(erlang:system_time(microsecond)),
+ Opts = ["-timeout", "3"],
+
+ try
+ [] = start_node_and_apply(Name, "timer sleep [10000]", Opts)
+ after
+ halt_node(Name)
+ end,
+
+ ok.
+
%
% Utility functions...
%