aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-02-23 16:15:10 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-02-23 16:37:53 +0100
commitbedde8c59e568b15bee4b36dc4e4eaa93d00f63a (patch)
tree012fdc70d305c47bda833fce4f679a49eb241dfe /lib/kernel
parent4603e0d2b49e7ab488698a22b7831d3f3f113166 (diff)
downloadotp-bedde8c59e568b15bee4b36dc4e4eaa93d00f63a.tar.gz
otp-bedde8c59e568b15bee4b36dc4e4eaa93d00f63a.tar.bz2
otp-bedde8c59e568b15bee4b36dc4e4eaa93d00f63a.zip
kernel: Add heart options test
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/test/heart_SUITE.erl30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index b942d24bf9..6cf451b10b 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -28,6 +28,7 @@
node_start_soon_after_crash/1,
set_cmd/1, clear_cmd/1, get_cmd/1,
callback_api/1,
+ options_api/1,
dont_drop/1, kill_pid/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -68,6 +69,7 @@ all() -> [
node_start_soon_after_crash,
set_cmd, clear_cmd, get_cmd,
callback_api,
+ options_api,
kill_pid
].
@@ -394,6 +396,34 @@ callback_api(Config) when is_list(Config) ->
stop_node(Node),
ok.
+options_api(Config) when is_list(Config) ->
+ {ok, Node} = start_check(slave, heart_test),
+ none = rpc:call(Node, heart, get_options, []),
+ M0 = self(),
+ F0 = ok,
+ {error, {bad_options, {M0,F0}}} = rpc:call(Node, heart, set_options, [{M0,F0}]),
+ none = rpc:call(Node, heart, get_options, []),
+ Ls = lists:duplicate(28, $b),
+ {error, {bad_options, Ls}} = rpc:call(Node, heart, set_options, [Ls]),
+ none = rpc:call(Node, heart, get_options, []),
+
+ ok = rpc:call(Node, heart, set_options, [[scheduler]]),
+ {ok, [scheduler]} = rpc:call(Node, heart, get_options, []),
+ ok = rpc:call(Node, heart, set_options, [[]]),
+ none = rpc:call(Node, heart, get_options, []),
+
+ ok = rpc:call(Node, heart, set_options, [[scheduler]]),
+ {ok, [scheduler]} = rpc:call(Node, heart, get_options, []),
+ {error, {bad_options, Ls}} = rpc:call(Node, heart, set_options, [Ls]),
+ {ok, [scheduler]} = rpc:call(Node, heart, get_options, []),
+
+ receive after 3000 -> ok end, %% wait 3 secs
+
+ ok = rpc:call(Node, heart, set_options, [[]]),
+ none = rpc:call(Node, heart, get_options, []),
+ stop_node(Node),
+ ok.
+
dont_drop(suite) ->
%%% Removed as it may crash epmd/distribution in colourful