diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-01 18:21:04 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-01 18:21:04 +0200 |
commit | 05a99a4631fee28e0a5a690db094a2d675aae456 (patch) | |
tree | c0e9e403158671acae69f828bfcceb7b1be9c191 /lib/os_mon | |
parent | c36e45f8faa5ffb24479e4ab268ab151e305e779 (diff) | |
download | otp-05a99a4631fee28e0a5a690db094a2d675aae456.tar.gz otp-05a99a4631fee28e0a5a690db094a2d675aae456.tar.bz2 otp-05a99a4631fee28e0a5a690db094a2d675aae456.zip |
Don't crash in end_per_testcase
Diffstat (limited to 'lib/os_mon')
-rw-r--r-- | lib/os_mon/test/disksup_SUITE.erl | 6 |
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 |