aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/test/snmp_test_lib.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-06-13 11:51:42 +0200
committerMicael Karlberg <[email protected]>2019-06-17 10:24:43 +0200
commita601b7989b90649acd4deb3e42a2105d4e145ca5 (patch)
treea3ecf4f7a256d908501cdf67e33a02f13bb5ce79 /lib/snmp/test/snmp_test_lib.erl
parent447c50b21b35fa0fd35261d5add4f10b50cbda12 (diff)
downloadotp-a601b7989b90649acd4deb3e42a2105d4e145ca5.tar.gz
otp-a601b7989b90649acd4deb3e42a2105d4e145ca5.tar.bz2
otp-a601b7989b90649acd4deb3e42a2105d4e145ca5.zip
[snmp|manager|test] Problems starting (slave) nodes
When we fail to start a (slave) node with reason timeout, its possible that it actually succeeded, which will cause the following test case(s) init to fail (with 'already started', since it which also try to start this node). But since we don't know if we get this because for this reason or because the previous test case failed to clean up after itself, we cannot assume that the state of the node is ok (and therefor use it). So, we attempt to stop it, and try start it again (*one* time). This has been observed on one (slooow) VM host.
Diffstat (limited to 'lib/snmp/test/snmp_test_lib.erl')
-rw-r--r--lib/snmp/test/snmp_test_lib.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index 42f710e4cd..35bc535a80 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -36,7 +36,7 @@
-export([hours/1, minutes/1, seconds/1, sleep/1]).
-export([flush_mqueue/0, trap_exit/0, trap_exit/1]).
-export([ping/1, local_nodes/0, nodes_on/1]).
--export([start_node/2]).
+-export([start_node/2, stop_node/1]).
-export([is_app_running/1,
is_crypto_running/0, is_mnesia_running/0, is_snmp_running/0]).
-export([crypto_start/0, crypto_support/0]).
@@ -512,10 +512,14 @@ nodes_on(Host) when is_list(Host) ->
start_node(Name, Args) ->
- Opts = [{cleanup,false}, {args,Args}],
+ Opts = [{cleanup, false}, {args, Args}],
test_server:start_node(Name, slave, Opts).
+stop_node(Node) ->
+ test_server:stop_node(Node).
+
+
%% ----------------------------------------------------------------
%% Application and Crypto utility functions
%%