Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2018-02-16 18:49:39 +0300
committerPaweł Chmielowski <pchmielowski@process-one.net>2018-02-16 18:49:48 +0300
commit71a856deaafa5dcb706c70b414f9a2219cdec855 (patch)
tree074b4f52752b5699d53700a1d4c9518d1a3d5f60
parent7e1df0752a286a6a947c99b9b9cc791df69057d6 (diff)
Handle gracefully that mnesia is already loaded when starting tests
-rw-r--r--test/suite.erl10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/suite.erl b/test/suite.erl
index b91583d18..960cbdc90 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