summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2018-02-16 16:49:39 +0100
committerPaweł Chmielowski <pchmielowski@process-one.net>2018-02-16 16:49:48 +0100
commit71a856deaafa5dcb706c70b414f9a2219cdec855 (patch)
tree074b4f52752b5699d53700a1d4c9518d1a3d5f60 /test
parentExport helper function (diff)
Handle gracefully that mnesia is already loaded when starting tests
Diffstat (limited to 'test')
-rw-r--r--test/suite.erl10
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