aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-05-31 14:40:25 +0200
committerLukas Larsson <[email protected]>2016-06-14 10:09:37 +0200
commit4a96eb9dadf453724860a7e2e060894dca360fd6 (patch)
treeb91c60d63cde039778f05e7bb0af5c60eca369c5 /lib/os_mon
parent7d0c75c91cbe903868efc51ffa6c721fe29447a2 (diff)
downloadotp-4a96eb9dadf453724860a7e2e060894dca360fd6.tar.gz
otp-4a96eb9dadf453724860a7e2e060894dca360fd6.tar.bz2
otp-4a96eb9dadf453724860a7e2e060894dca360fd6.zip
os_mon: Make sure to start/stop os_mon in tests correctly
Diffstat (limited to 'lib/os_mon')
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl2
-rw-r--r--lib/os_mon/test/os_mon_SUITE.erl9
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index 41115ee6e2..7122d23503 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -256,7 +256,7 @@ unavailable(Config) when is_list(Config) ->
restart(Config) when is_list(Config) ->
ok = application:set_env(os_mon, start_cpu_sup, true),
- {ok, _Pid} = supervisor:restart_child(os_mon_sup, cpu_sup),
+ supervisor:restart_child(os_mon_sup, cpu_sup),
ok.
%% Aux
diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl
index 033a5ae162..c373b5d851 100644
--- a/lib/os_mon/test/os_mon_SUITE.erl
+++ b/lib/os_mon/test/os_mon_SUITE.erl
@@ -21,7 +21,7 @@
-include_lib("common_test/include/ct.hrl").
%% Test server specific exports
--export([all/0, suite/0]).
+-export([all/0, suite/0, init_per_suite/1, end_per_suite/1]).
%% Test cases
-export([app_file/1, appup_file/1, config/1]).
@@ -36,6 +36,13 @@ all() ->
_OS -> [app_file, appup_file]
end.
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ application:stop(os_mon),
+ ok.
+
%% Testing .app file
app_file(Config) when is_list(Config) ->
ok = test_server:app_test(os_mon),