summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index e98ca9be33..530955c201 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -224,6 +224,13 @@ prepare() ->
start() ->
try
+ %% prepare/1 ends up looking at the rabbit app's env, so it
+ %% needs to be loaded, but during the tests, it may end up
+ %% getting loaded twice, so guard against that
+ case application:load(rabbit) of
+ ok -> ok;
+ {error, {already_loaded, rabbit}} -> ok
+ end,
ok = prepare(),
ok = rabbit_misc:start_applications(application_load_order())
after