summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_tests.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 76421d1a..5fe319d3 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -808,6 +808,7 @@ test_log_management_during_startup() ->
%% start application with logging to non-existing directory
TmpLog = "/tmp/rabbit-tests/test.log",
delete_file(TmpLog),
+ ok = control_action(stop_app, []),
ok = application:set_env(rabbit, error_logger, {file, TmpLog}),
ok = delete_log_handlers([rabbit_error_logger_file_h]),
@@ -816,6 +817,7 @@ test_log_management_during_startup() ->
%% start application with logging to directory with no
%% write permissions
+ ok = control_action(stop_app, []),
TmpDir = "/tmp/rabbit-tests",
ok = set_permissions(TmpDir, 8#00400),
ok = delete_log_handlers([rabbit_error_logger_file_h]),
@@ -830,6 +832,7 @@ test_log_management_during_startup() ->
%% start application with logging to a subdirectory which
%% parent directory has no write permissions
+ ok = control_action(stop_app, []),
TmpTestDir = "/tmp/rabbit-tests/no-permission/test/log",
ok = application:set_env(rabbit, error_logger, {file, TmpTestDir}),
ok = add_log_handlers([{error_logger_file_h, MainLog}]),
@@ -849,12 +852,13 @@ test_log_management_during_startup() ->
%% start application with standard error_logger_file_h
%% handler not installed
+ ok = control_action(stop_app, []),
ok = application:set_env(rabbit, error_logger, {file, MainLog}),
ok = control_action(start_app, []),
- ok = control_action(stop_app, []),
%% start application with standard sasl handler not installed
%% and rabbit main log handler installed correctly
+ ok = control_action(stop_app, []),
ok = delete_log_handlers([rabbit_sasl_report_file_h]),
ok = control_action(start_app, []),
passed.