diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-02-16 16:49:39 +0100 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2018-02-16 16:49:48 +0100 |
commit | 71a856deaafa5dcb706c70b414f9a2219cdec855 (patch) | |
tree | 074b4f52752b5699d53700a1d4c9518d1a3d5f60 /test | |
parent | Export helper function (diff) |
Handle gracefully that mnesia is already loaded when starting tests
Diffstat (limited to 'test')
-rw-r--r-- | test/suite.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/suite.erl b/test/suite.erl index b91583d1..960cbdc9 100644 --- a/test/suite.erl +++ b/test/suite.erl @@ -89,8 +89,14 @@ init_config(Config) -> ConfigPath = filename:join([CWD, "ejabberd.yml"]), ok = file:write_file(ConfigPath, CfgContent2), setup_ejabberd_lib_path(Config), - ok = application:load(sasl), - ok = application:load(mnesia), + case application:load(sasl) of + ok -> ok; + {error, {already_loaded, _}} -> ok + end, + case application:load(mnesia) of + ok -> ok; + {error, {already_loaded, _}} -> ok + end, case application:load(ejabberd) of ok -> ok; {error, {already_loaded, _}} -> ok |