aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/test/disksup_SUITE.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-01 18:21:04 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-01 18:21:04 +0200
commit05a99a4631fee28e0a5a690db094a2d675aae456 (patch)
treec0e9e403158671acae69f828bfcceb7b1be9c191 /lib/os_mon/test/disksup_SUITE.erl
parentc36e45f8faa5ffb24479e4ab268ab151e305e779 (diff)
downloadotp-05a99a4631fee28e0a5a690db094a2d675aae456.tar.gz
otp-05a99a4631fee28e0a5a690db094a2d675aae456.tar.bz2
otp-05a99a4631fee28e0a5a690db094a2d675aae456.zip
Don't crash in end_per_testcase
Diffstat (limited to 'lib/os_mon/test/disksup_SUITE.erl')
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index 871f7cb3d2..bd90093d29 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -315,8 +315,10 @@ unavailable(Config) when is_list(Config) ->
restart(Config) when is_list(Config) ->
ok = application:set_env(os_mon, start_disksup, true),
ok = application:set_env(os_mon, disksup_posix_only, false),
- {ok, _Pid} = supervisor:restart_child(os_mon_sup, disksup),
- ok.
+ case supervisor:restart_child(os_mon_sup, disksup) of
+ {ok, _Pid} -> ok;
+ {error, running} -> ok
+ end.
%% Test that alarms are cleared if disksup crashes or
%% if OS_Mon is stopped